To be sure, the station could be several hundred years old by the time of TNG - and still armed to the teeth with the latest and most modern gadgetry Starfleet R&D can come up with. This asset would be big enough to warrant protecting, so it would receive constant defensive upgrades.
And we know that space stations in the Trek universe can be really badass, holding off dozens or even hundreds of starships. And we surprisingly also learn that they fight best when there are no friendly starships on the way... It'd probably make sense for stations on Earth orbit to have considerable defenses even if the Sol system as such is also defended - we've seen determined enemies push through the outer defenses and reach Earth before, so major assets near the planet would benefit from defenses of their own.
Conversely, though, I doubt Spacedock is a major element in the defense of Earth. It's only a single space station, after all, and on such a low orbit that it suffers from coverage problems.
Timo Saloniemi