I just measured it on my screen with a ruler and it turns out its only 5mm long, not 5 inches. This sort of blatant military industrial fraud is why only freedom units are suitable for weapon design!
If you apply physics/math knowledge, you can understand why these 5-inch guns are more deadly. Higher velocity, longer range and more accurate are what makes these a better fit for modern warfare. Relatively speaking, these smaller ships can be produced and deployed faster. Although the costs seem high, they are comparatively cheap.