I fully agree you need to buy the domain as soon as you name your project, and that's where this person went wrong, but that doesn't make domain sniping any more ethical.
The MUCH more likely scenario is that someone simply thought of the same name and bought it.
I think you are severely underestimating how often this sort of behaviour happens.
Totally legal (and IMO should be!), but anyone doing that is absolutely crossing an ethical line.
Even if it steps on a trademark?
I'm sure this did happen but given the followup post (https://kill-saas.com/posts/from-0-to-5) it seems like the author is mostly playing up the experience as a way to advertise his product. Mentioning the vibe coding, the Discord key, and leaving the GitHub repository public feels a little like this might be clickbait.
For well-funded corporate projects it makes more sense; those cost more to rename, and paying extra for the domain name they want is nothing to them.
That's life. Lesson learned.
And yes, interferring with someone else hosting their project is wrong. If you don't want a domain for yourself, don't buy it. Messing with people makes you a dick and trying to buy something only to re-sell it makes you a parasite.
Domain squatting, shoud this have been the intention here, is obviously also wrong and often used for illegal activity.
There's just no world where this person doesn't have a right to complain because clearly they are the victim of someone else being a dick.