The fact that the Marine Corps by its nature is a sea, air and land force vastly complicates that argument. It is in fact necessary to have bases near coastal areas. Amphibious assaults practiced at Pendleton utilize aircraft from Miramar, and virtually every training exercise has a sea based element attached to it that involves the Navy and the Marine Corps working together. By way of analogy, many wireless companies locate themselves in San Diego to be near Qualcomm, and the Marine Corps needs to be close to the Navy even though a place like Kansas would be cheaper.
Operationally, when Marines deploy – often including Miramar Marines with their aircraft – they embark on ships stationed in San Diego and deploy to places like Iraq. In the end the argument is not whether we could move Miramar, but where we would move it to. You need a coastal city, located near the Navy, with 5000 acres open to build.
It is also worth noting that the military industrial complex in San Diego to include employers like Northrop, ViaSat, SpaWar etc. all have important interactions with a base like Miramar. And lastly, the bases pump a large amount of $$ into the local economies.
I do believe that the military is protecting its turf, but rightfully so in some cases.