Specifically: setting up database replication sucks, setting up failover sucks, setting up backups sucks (even with a PaaS you need to do this, but you can use it as your first layer), migrating database clusters to new versions or hosts sucks, keeping your host's software up to date sucks, and setting up alerting and monitoring sucks.
It's easy to get an open port to connect to, but hard to keep it there for five years.
I've done self-hosted databases. It's easy to take it for granted if you've done it before, because once you've done it, you know that it is easy. But, even though it easy, it requires work. You have to spend time learning how to do it well, and you have to go through all the steps setting things up and configuring it. There's all the backups and monitoring that you want. Death by a thousand cuts, and all that.
I still self-host databases for personal projects, but I can see why so many people don't want to bother. When I've done it professionally, I was basically working as a sysadmin and managing stuff like database servers was a core job function, not something tacked on to a development job.
If you install your own copy, you are on call for it, and the colo is unlikely to offer much help. You also have to set up monitoring or you won’t even know when it fails. Then there’s replication. Backups. All this stuff is work that PaaS vendors are ready to automate away, if my time is expensive for the org.
For fun, sure, dink around and learn as long as there are no customers to affect.
You are not wrong but for each personal project this upfront cost is 2 hours maximum, with accumulated 5-6 more over the course of the next 3-6 months.
Not a huge sacrifice. Though I do get the argument of "I want to pay $5 and it to just work" and I've done so part of the times. Just pointing out that the upfront investment in doing it on your own is not so big.
I suppose Terraform could do it (I’m pleasantly surprised to see it has a PagerDuty plugin), but it’s a lot more to write than a PaaS API, and you probably can’t borrow a specialist SRE/DBA for a small fraction of his salary.