Barrels are surprisingly soft. Doesn't take much to bend one.
Better would be to say they are tough and soft, to take all the violence that goes on through them.
Hammered or cut they need to be pretty soft to make a hole all along them.
I forget when they are hardened in the making process. If you see how a sword blade is quenched and the makers concerns that the blade can go all wonky in the process, then anything steel is going to have similar issues.
Again barrels are far from perfect, and in truth don't need to be. Modern manufacturing and design of all the parts including the projectiles all addd to accurate.
One MOA to 1000m with firearms is doable. 1/4" inch at 40m with an air rifle barrel isn't so big an ask. When farmyard ranges were the norm then a rifled pipe would suffice.