It's a balance, and it isn't about velocity.
There is less whip with shorter barrels, but higher muzzle pressures.
This results in a window of best overall performance for different cartridges.
A window where accuracy is best.
Otherwise every gun would naturally be built on stiff 22" barrels like the relatively tiny 6ppc.
But if you built a 6ppc in either 18" or 26" even it would lose competitive performance that you could not recover with load development. It would languish outside it's performance balance.
Factories sacrifice performance for practicality in field carry. Their accuracy standards are also inline with general masses rather than actual LR hunter needs.
Same with 'tactical' gunbuilders. The average LE/SWAT sniper use occurs around 80yds, and the last thing they need is to lug around a 'competitive' barrel for this.
On the flipside, every year I visit the Williamsport WO(1Kyd comp) and see hundreds BR boomers, and I don't see any with stubby barrels. They typically range from 28" to 34".
NEVER will you see a competitive 1kyd magnum used with a 22" barrel, and it's not because they need velocity. It's because they need bullets cleanly released, and with low ES.
The only way to get both is to burn as much powder as they can INSIDE the bore.