True. But even if you have the physical ability, skills, tools, and equipment handy - you can spend a lot of time on maintenance & repairs. Just ask anyone who's done yard work for a few years, or has repainted a house, or ...
That said a layperson probably won't know the new code requirements in their jurisdiction and if you sell your house you'll have the inspector tut-tutting the work for one reason or another.
"Surely it wouldn't be too hard to undo/redo piping etc." But yeah, different refrigerant, different code requirements for vents and exhausts and drains. 4 people working for 16 hours, I saw where the money went.
How much time does it take to acquire & refresh the skills and code knowledge, and how many water heaters can you amortize that over during your life?
The building code stuff is more of a bugbear.
Admitting that one of my grandfathers was a blacksmith and the other a farmer, that my own father could have built a house from the ground down (I helped him dig and pour a foundation once) and then up, etc. - most modern Americans just don't have the backgrounds/aptitudes/comfort levels needed to try and succeed at such tasks.
I built a custom shelf for my closet. It'd have costed me an arm and a leg to have someone else do that, even with a tech worker's salary.
I also built a custom walk-in closet. It took me a day, saved me over 2k and I got a better quality closet out of it. (You find find built yourself a walk-in-closet kits that are easy to assemble, it really isn't that hard, just don't get the home depot level quality ones.)
For example, to mow your lawn, you have to find a time to do it every couple of weeks when the weather cooperates, be at home at that time, store and maintain the equipment, have a pair of "grass shoes", clean up afterwards, etc.
This might be worth the effort if you don't have much disposable income. But if you have money to blow, hiring someone to mow your lawn can give you more time to do something else you'd rather do.