The Gorgoroth area, which encompasses Barad-dûr and Mount Doom, was the last stronghold of Sauron. Why Sauron fought Gil-galad and Elendil near Mount Doom rather than Barad-dûr is not specified.
The Silmarillion recounts the battle like this:
Then Gil-galad and Elendil passed into Mordor and encompassed the
stronghold of Sauron; and they laid siege to it for seven years, and
suffered grievous loss by fire and by the darts and bolts of the
Enemy, and Sauron sent many sorties against them. There in the valley
of Gorgoroth Anárion son of Elendil was slain, and many others. But at
the last the siege was so strait that Sauron himself came forth; and
he wrestled with Gil-galad and Elendil, and they both were slain, and
the sword of Elendil broke under him as he fell.
As others have noted, Elrond says, in FOTR:
`I was the herald of Gil-galad and marched with his host. I was at the
Battle of Dagorlad before the Black Gate of Mordor, where we had the
mastery: for the Spear of Gil-galad and the Sword of Elendil, Aiglos
and Narsil, none could withstand. I beheld the last combat on the
slopes of Orodruin, where Gil-galad died, and Elendil fell, and Narsil
broke beneath him; but Sauron himself was overthrown, and Isildur cut
the Ring from his hand with the hilt-shard of his father's sword, and
took it for his own.'
That's not a contradiction, since from this map we can see that Gorgoroth encompasses Mount Doom and Barad-dûr.

So it was all of Gorgoroth where Sauron made his last stand. We can only speculate as to why the battle between Sauron and Gil-galad / Elendil happened at Mt. Doom rather than somewhere else in Gorgoroth, unless History of Middle Earth provides additional details.
My first thought is that Tolkien put the fight at Mt. Doom in FOTR because it sounds more dramatic. Since the Silmarillion wasn't published, it didn't matter that the Silmarillion just says Gorgoroth .
For an in-universe explanation, I'd say that Sauron wasn't going to wait around in Barad-dûr, because that seems cowardly? Or maybe the Last Alliance forces were bombarding Barad-dûr, since it was destroyed in the battle, although I'm not sure if it was before or after Sauron's defeat.
Why Moon Doom then? Again, we can only speculate. Maybe the ring, as it got closer to the only place where it could be destroyed, would be harder for its possessor to resist its draw. Sauron could have been making it likelier for the ring to be used (therefore corrupting its wearer) in the event of his defeat.
Or, it could be simply because being high ground, it was the most strategic place for Sauron to make his last stand.