It was 7
years actually.
I've always found these numbers rather unbelievable myself...
The longest recorded siege in our own history lasted for twenty-two years, so a seven-years-siege is not unbelievable.
I can’t claim to be a military historian but I do have an idea as to why the Siege of
Barad-dûr could last for so many years.
Laying siege to a town or fortification has the purpose of encircling the structure in question so as to force its’ surrender when the encircled forces’ supplies are used up. The great advantage of laying siege is that you avoid heavy casualties by assault, but on the other hand a siege can take long time and therefore be very expensive, and that the besieging army is bound to the siege itself and can not be used elsewhere.
A siege can basically arise from two situations. (1) the attacking forces chooses this tactics after the defenders have retreated into their stronghold. (2) the attacking forces are unable to breech the
walls of the defenders stronghold and are forced to break off their assault to fall back and lay siege (maybe simply to gather their strength for another assault).
Concerning the siege of Barad-dûr I don’t believe the Last Alliance came to
Mordor with the attention of laying siege. First of all because a siege deep within Mordor would be extremely difficult due to the environmental conditions in the land would not have been healthy, especially for the
Men (lack of sunlight, lack of clean water supplies, the air filled with poisonous fumes and ash from Mount Doom etc.). So laying siege to Barad-dûr meant that all crucial supplies such as
food, water, and medicine would have to have been brought in from outside Mordor, which is not an ideal situation because the supply lines would be very vulnerable to attack from
Sauron’s allies.
I therefore believe that the Alliance tried to assault Barad-dûr but was unable to break through the stronghold’s defences (due to the fact that the walls themselves were made of iron and extremely hard stone, the gates were made of steel, and the foundations of the
fortress were strengthened by the power of
the One Ring), so they were forced to lay siege. This in itself would be a futile effort because Barad-dûr was located at the end of a long spur of the Ash
Mountains, which was most likely full of underground tunnels which made it possible for supplies and warriors to be brought in to the besieged tower from
Rhun, enabling Sauron to repel the assaults made by the Alliance, and making it impossible for the Alliance to isolate the fortress completely. The Alliance would therefore have been forced to uphold an aggressive siege with continuous assaults on Barad-dûr.
The seven years of siege seems, then, to have been a period in which both defenders and attackers tried different tactics to break the deadlock; in the end it appears that the Alliance was the most successful in dealing losses to the enemy, and thereby forced Sauron to gather his remaining forces and allies in a last attempt to break the siege and defeat the Alliance (this assumption is based purely on the fact that Sauron personally engaged the forces of the Alliance near Orodruin, which lay around 30 miles west of Barad-dûr, not at Barad-dûr itself which would seem likely if the Alliance had finally managed to break through the defences).