User blog comment:RandomGuy96/So how do planetary defense cannons work?/@comment-4950455-20130127221231/@comment-4950455-20130127230454

Because it's rarely going to break down that neatly. Like I said, I assume the proper place for PDCs is working in conjunction with a defending fleet. While you're busy shooting at the stationary guns that can't possibly hit you, you're ignoring the enemy ships firing at you.

Really, you may as well ask why any short-range weapon exists, in fiction or reality.