The concept goes back to the early days of firearms, when a lot of warfare was still conducted by means of siege of castles or other fortifications.
"Wall guns," were used by the defense and were intended to be fired from the battlements atop the fortress wall. Because they were more static and didn't need to be particularly mobile, they could be considerably larger and heavier than a long arm carried by soldiers in the offense who would need to be more mobile.
No wonder they were track mounted in Viet Nam.