In case of stumping, the batsman misses the flight and line/length of the ball (which is due to the deception caused by the bowler) and subsequently get stumped by the wicket-keeper. So, in case of stumping, the score-board indicates: 'Batman st. Wicket-keeper bd. Bowler'. In case of stumping, the credit goes to the bowler and also to the wicket-keeper.
In case of run-out, the batsman does not get deceived by the bowler. The batsman hits the ball for scoring runs, but before completion of the run, the fielder sends the ball back to the wicket-keeper who takes out the bell. In some cases, the fielder hits the wicket in a direct throw. So, in case of a run-out, bowler is not involved. So, credit does not go to the bowler.
Caution: Explosive. Handle with care.