In the Lord of the Rings by JRR Tolkien, the Siege of Minas Tirith and the Battle of the Pelennor Fields were the penultimate battles in the war against Sauron. The entire literary merits of the battles, and their Wagnerian apocalypticism, I will leave behind, to focus on their military implications. Of course, certain aspects of the battle are colored by fantasy elements, but the general military character of the battle still stands.

Sauron's army had overwhelming military power and mobility. His armies had the upper hand over the forces of Gondor for many years at this point, and leading up to the battle, had gained a more and more overwhelming strength, as Sauron had marshalled his allies and unleashed more and more powerful weapons and sorceries.

Despite this, Sauron was defeated in the battle due to a combination of fantasy factors (lost undead army returns for revenge) and military blunders that would doom any army. Gondor had concentrated most of its army inside the fortress of Minas Tirith, and Sauron's army could have easily steamrolled through the rest of the country and not stopped until they got to the ocean. Sauron, however, was so obessed with taking Minas Tirith that not only did he put his overwhelmingly large army into a position where their advantage was nullified, he also left his flanks open, leading to a devastating counter attack that scattered his army. He also kept a tight control of his army through one single lieutenant, which left his army totally leaderless when his lieutenant died.

Although the specific reason he chose to besiege a single city instead of using his army in a blitzkrieg is due to the fantasy element of Sauron's hatred of Gondor and his desire for the ring of power, the real world could present a long history of generals and rulers who lost battles because they attached emotional importance to a piece of ground out of proportion to its military importance.

In short then, the siege of Minas Tirith and the counter attack at the Pelennor Fields were due to several military mistakes on the part of Sauron, including:

  1. Using an overwhelming military force to besiege a static target when it could have been used otherwise.
  2. Not keeping the flanks of his army well protected, thinking that no attacks could come from those directions.
  3. Keeping his army under too tight of a control, which led to its quick disintegration upon his top field lieutenant's death.

Some of these are of course specific to the fantasy character of the novel. Sauron, as a corrupted, evil being, is not going to hand over his army to a Joint Chief of Staffs. He is going to give it to his hideous undead ringwraith. But it certainly doesn't take a corrupted Maia to make the bad decision of giving total control of his army to one person, with no plan if that person becomes inoperative.

The other side did not have a particularly good military strategy. Gondor and Rohan only managed to pull off the battle through a series of divine interventions. Sitting in a castle, no matter how secure, will eventually lead to destruction. Rohan's counter attack was not especially powerful, and would have failed if not for the simultaneous arrival of Aragorn's fleet from the South. However, Rohan and Gondor were fighting for their life, and knew that they were going to be destroyed, and chose to fight anyway, even though they had little hope. Their military plan was not particularly good, but unlike Mordor, they had no choice in the matter.