Well, when a nation decides to attack some other nation, they don't empty out their entire army. They just use how much they think they'll need. Gondor was weak, so Sauron just sent out enough orcs to overwhelm Minas Tirith. He was also attacking Erebor and Lorien, as well as several other parts of Gondor. To make sure Rohan didn't come to help, he blocked the path that Rohan could come through (though the Woses foiled that plan). I personally think that Sauron's plan was pretty flawless and good. It's just that the good guys had luck and stuff. I don't think that anybody in Sauron's place would have expected that the Oathbreakers would help Aragorn, that the Woses would decide to fight for the ones that hunted them, and that the ents would decide to fight after ages of doing nothing. They're just things that he neglected, as most people would.
|