I was very confused by the military enhancements at first but I think the behavior is as follows:
1) All Starbase types can be upgraded for defense. They only use their weapons defensively and do not offensively attack an intruder. They can defend themselves with no orbiting fleet if attacked, and a fully upgraded starbase is pretty beefy.
1) Military Starbases can be also be used as force multipliers as mentioned. There are a whole host of different buffs for you and debuffs for the enemy. This can be very powerful. I use them at key star systems to allow a smaller home fleet to defend while my attack fleet is off in enemy territory. Drawback is they take up a location you could be using for an economic starbase.
Here is an example of a highly enhanced military starbase. This base has an area of effect enhancing merc which broadens the coverage across the whole star system.
BTW - Another trick is to create a Support Ship that does nothing but extend sensors and orbit it around the star base and you can get crazy long range sensor coverage for the base as well.
