The original intention of the NFA, back in 1934, was to restrict handguns. The "short-barreled rifle" and "short-barreled shotgun" provisions were designed to limit how well a long arm could be concealed.
The handgun portion didn't survive, but the minimal length requirements did.
Also, interestingly, it wasn't a ban but a tax. Congress at the time believed they didn't have the Constitutional authority to ban any class of firearms, so they instituted a prohibitive tax ($200) on short-barreled rifles and shotguns, "destructive devices", and automatics. There's a $5 tax on "any other weapons", which these days mostly applies to guns that don't look like guns.
Bear in mind that $200 in 1934 is about $3,700 today. At the time, you could mail order a .45 Thompson submachine gun for about $200, so the law effectively doubled the price. They were advertised as self-defense weapons for property owners: https://gastatic.com/digest/wp-content/uploads/2016/04/tumbl...
Automatics weren't banned until 1986, and even then, they weren't technically banned - they just require that $200 tax, and it's not possible to pay the tax for one made after May of 1986.