IIRC, the law once did say 18” shotgun & rifle but was later changed to 16” rifle after millions of M-1 carbines with 16” barrels wound up in private hands following WWII.
That came up again when GCA ‘68 was passed. I could be wrong.
“...after millions of M-1 carbines with 16 barrels wound up in private hands following WWII...”
All original (WW2) M1 Carbines made under contract for the US government had 18-inch barrels, not 16-inch barrels. Same with military M1A1, M2, and M3 Carbines.
After the war, copies of the Carbine were manufactured by a number of different companies, with varying degrees of interchangeability with originals, in calibers from 22 rimfire up to 44 Magnum. “Pistol” variants were made, most notably the Enforcers, produced by Plainfield and Iver Johnson, that had barrels extending just past the tip of the forend.