The barrel nut simply allows the user, with a action wrench and headspace gauges to screw in the barrel to the right headspace and torque it in. Not all pre-fit barrels use a barrel nut, Savage and Rem 788 are the big ones. Others like AI and Desert Tech are quick change without a barrel nut, different mechanism entirely.
A smith can thread a barrel blank to use a barrel nut easily, for pretty much any action. Pre-fit barrels that have specific threading for specific actions like Savage or Rem 788 also take into account that those actions use floating boltheads, so you can change the boltface and go to a completely different caliber eg 223 to 308.
Barrels are consumable, so it's more like making the pre-fit barrel with the correct threads to accept the action.