When you enter the military it is known that you give up general rights. You can't go where you want, say what you want, do what you want. You follow orders. You also subject yourself to an entirely different of laws (The uniform code or something like that). When you are on an american military base you aren't usually subject to the laws of the country you are in. This was one of the reasons we left Iraq when we did. The Iraqis wanted American service personal to be subject to Iraqi law and the Americans did not. Back to the point however, on the base however I am almost completely certain that you are subject to the laws of your home country, not the country the base resides in. Outside the walls of the base my be a different story.
American military bases house military and non military personal. Generally if you are a physician there you are military personal. Situations imaginably arise where one would want an abortion but unable to get it off the base. I am sure at least a few women were denied abortions in these military bases, enough to drive women's rights groups to push for an bill that mandated military physicians to preform abortions at a patient's request.
I find this equally wrong as the current bills up for debate but at least this side has a bit of traceable logic behind it.