Once you know how to build and maintain infrastructure you realize that while it's nice to know how to do it, it's not cost-effective.

The thing is, it's worth it to learn. Do you know the basics of how to set up a completely redundant environment? There's no conceptual difference between setting one up at home by using consumer equipment and setting it up in a data center. You can get pretty capable equipment (Mikrotik) for less. The enterprise stuff has more configuration options, but it's doubtful that you'll use most of them.

Set up backup WANs, redundant routing, DNS, power, etc is fun. Setting up redundant load balancers, backend services, databases, etc is also fun. It's not hard to do, it's just hard to get it all right. There are probably a zillion configuration parameters you can mess with, and only a few sets actually work. Unfortunately, the sets that work in your home won't be the ones that will work in production, but you could possibly run load tests etc to simulate a real environment (though simulating multiple clients from multiple endpoints is harder than you think).

And of course, getting production equipment is hard. Nobody has 2 F5s lying around. And you really need at least 4 F5s, because you have redundant locations. That's a lot of cashola. And in most environments you wouldn't want some random person messing around with the production (or test) F5s. It's the same with NAS, VM servers, docker registries, etc.

I suspect getting the whole end-to-end setup isn't something people experience anymore, because small companies have (or at least should have) moved to the cloud by now.

Not everything that seems "interesting" is worth it to learn from an economic perspective. Could it be worthwhile for someone studying for the A+ Computer Technician test? Maybe. Could it be worth it for someone looking to impress their boss Harry? Possibly, if Harry also controls your pay and has a penchant for overpaying for locally run infrastructure and a distrust of the cloud. Possibly. These kinds of investments are based evaluated at the individual level --- not everyone will benefit. Some may find themselves no more competitive in the job market as your average IT clown, but as always, results will vary.

Learning things because they are interesting is reason enough in itself for many people, regardless of any economic benefit.