Spaceports are the only ships or stations in the game where you can upgrade/downgrade/sidegrade between several separate roles, namely Small/Medium/Large Spaceports. This is intended behavior, presumably so that you can stick a small spaceport over a new colony and upgrade it to something bigger later on if you decide you want to, rather than having to tear down the existing station and build an entirely new station in its place.
Also, the Large spaceport is arguably an improved Medium spaceport, which itself is arguably an improved Small spaceport, at least if you're keeping the designs roughly true to the base designs that the game provides for you. Small Spaceports are essentially minimal shipyard and trade hub facilities with minor defensive power, Medium Spaceports are essentially mid-size shipyards with moderate trading facilities and moderate defensive power, and Large Spaceports are major shipyards and trade centers with significant defensive power.
More than likely, despite your LSP-1 being a fairly obsolete design by comparison with your MSP-1, the game looked at the settings in your empire policies and went "we have a Medium Spaceport over a planet with 10 billion people on it! Imperial policy states that we're supposed to have Large Spaceports over any world with more than 7.5 billion people. We'll ask the Emperor for permission to upgrade the station to the 'latest design' and adjust the station type to something appropriate while we're at it." Note that the populations I listed are completely fictitious; if 7.5 billion happens to be the point where the game switches from Medium to Large spaceports, that's pure coincidence, and I of course have no way to know how large the world that your spaceport was built over actually is.
As a result, if you want to accept advisor recommendations to retrofit your state ships and bases to the latest designs, either keep all the spaceport designs that you use and that are larger (at least by name) than the one(s) you use up to date; an easy way to do this is to just use large spaceports or just copy the medium spaceport design and reclassify it as 'large' - that way, even if the MSP does get 'upgraded' to an LSP, it still has whatever capabilities you decided you wanted it to have, though you may need to go through and manually mark older LSP designs as obsolete if you take this route. You may also want to disable automatic retrofits, though I don't know that this will affect whether or not it receives retrofit orders when the advisor recommendation to retrofit pops up.
Also, just a comment on station design: really short-range weapons like railguns are perhaps not the best option for station defenses, especially if you don't have tractor beams. A handful of ships sitting at standoff ranges, or really even normal blaster ranges, is effectively immune to all the firepower you invested in those railguns; it's only the ships (mostly pirates) that close with the station, for example to perform a raid or because the attacking ship also uses railguns, that are vulnerable to these weapons.
< Message edited by Aeson -- 8/6/2014 5:16:40 AM >