The 16" minimum is because of Federal Law. Any rifle with a barrel less than 16" has to be registered as a SBR (Short Barreled Rifle).
There are a number of factors going into optimum barrel length. For me, there are two reasons I like longer barrels (most my rifles have barrels 26" or longer)
1 A longer barrel is quieter with less muzzle blast. Once you surpass that so-called "optimum length" the pressure starts dropping. A 29" inch barrel on a .22 using subsonic ammo doesn't even need a suppressor. I had a 29" barrel on my squirrel rifle, but it was too cumbersome to use squirrel hunting so I had it cut down to 25".
2 It is easier to hold still because of the long moment of inertia. This is one of two reasons why you see match rifles with muzzle weights. However, if the weight is too much, then it can cause muscle fatigue which leads to shaking.
A long thin barrel has a lot of whip, which means loads have to be carefully developed to be in the "sweet spot". Rifles with long thin barrels tend to not shoot very well with factory ammo. The second reason for muzzle weights is that they dampen the whip of the barrel. A short fat barrel has a much larger "sweet spot" and is more forgiving with different loads, therefore usually works better with factory ammo.
Of course with rimfire ammo, you are limited to factory ammo, so it's a matter of trying a lot of different brands until you find one that has the right harmonics.