How can civilian spacecraft be so heavily armed in most sci-fi settings?

I love when Spacedock poses questions about science fiction universes that most of us have never bothered to ask (like Why does every ship in sci-fi have its guns on backwards?).

In this video, they ask another interesting question: Why can civilians own armed spaceships and carry weapons that could lay waste to planets? In answering this question, they look to the unpoliceable vastness of space and draw analogies to sea piracy during the golden age of sail here on Earth.

Image: Screengrab