I absolutely hate how the Stormtroopers got from being Darth Vader's elite unit of Space Marines into the Galactic Empire's main cannon fodder. Imagine if the Imperial Army's main force was the Army Troopers: they would be the type of trooper you see at parades or patrolling the occupied streets, much like Hitler's SA, they would harass citizens and attack people who resist the Emperor's rule, and they would specialize in ground warfare. The 501st Stormtrooper legion, on the other hand, are supposed to be Darth Vader's Elite marines. They would serve on Darth Vader's personal Star Destroyer- The Devastator and accompany him on missions such as boarding ships and eliminating high value targets- they should be the most feared soldiers in the galaxy! Now here's why we don't, and should not, see Imperial Army troopers in the original trilogy-
We don't see any planets where the empire controls the local population with an iron fist: Tatooine is supposed to be a random desert planet- the Empire deployed Stormtroopers on the planet only to search for R2-D2 and C-3PO, and The Stormtroopers we see on Bespin accompanied Darth Vader on his mission.
The Stormtrooper fight the Rebel Alliance- which is an organized military force composed of Old Republic veterans and trained soldiers.
Now, why do we see Stormtroopers on the Death Star? And later in Endor during Return of the Jedi?
After Darth Vader captured Princess Leia, some of his Stormtroopers accompanied him to the Death Star, and the others remained on the devastator.
After the Death Star was destroyed by the Rebels, all of Vader's Stormtroopers who were on the death star perished. The Empire strengthened its hold over its occupied planets and forced civillians to enlist on the military. That's why we see so many Stormtroopers in Return of the Jedi.