Money. For one thing the carrier fleet was shrinking (also part of the peace dividend). In 1991 there were fifteen active fleet carriers, in 1992 fourteen. In 1993 when Alameda NAS was designated to close that was reduced to thirteen. In 1994 twelve. Alameda NAS closed in 1997. Today, there are eleven. A four-carrier port in he SF Bay was really no longer necessary and such facilities are expensive to maintain.
For another you had better coverage on the West by using the the existing ports at the extreme ends of the lower 48 - San Diego and Bremerton. SF in the middle was the obvious odd man out if you’re going to close major, expensive facilities.
I won’t say local politics had no influence. I have no doubt some of the military brass took some humor in shafting the Bay Area for all of its anti-military rhetoric. But really it was the obvious choice to close down. If I was playing a computer game modeling Navy management (yeesh, slow day), I suspect I’d have made the same choice. Drawing down forces, cutting expenses - yep, dafty-in-the-middle was the obvious geographic choice.