The pressure of the burning gunpowder can disrupt the shape of the base of the bullet once the barrel short enough.
No doubt. And this would certainly screw with your accuracy. Likewise a bad muzzle crown will affect accuracy.
And, of course, ultra short barrels get the least velocity.
But its a trade off. These things are given up to get the perceived advantage of the shortest gun possible.
The gambler who needed only minute of man at across the card table range didn't care if the gun couldn't hit a horse at 20paces.
I have found no US laws on handgun minimum barrel lengths. Only that a handgun must be rifled. Smoothbore handguns are "sawed off shotguns", and federally restricted.