Since Germany's defeat in World War I, under the strong advocacy of the French, the Allies imposed quite severe restrictions on Germany, including the prohibition of researching any heavy weapons.
These heavy weapons referred not only to airplanes and tanks, but also to machine guns, large-caliber rifles, and small artillery.
Simply put, the current German Army, apart from being equipped with rifles and handguns, was basically banned from developing other types of weapons.
A significant reason for the birth of the submachine gun in history was the Allies' restrictions on Germany.
Unable to research larger scale weaponry, the Germans had to blaze a new trail by inventing an entirely new weapon: the submachine gun, which used handgun ammunition but had a rate of fire comparable to that of machine guns.