They make more money selling EC2, with this software installed on top of it. If Amazon did not sell RDS, their customers would buy EC2 instances and install it on there.
Which of these realities would you prefer:
1. Mongo, ES, PG, etc have a cloud offering, which runs on metal they maintain. Naturally, the reliability and performance is worse. Amazon loses some money. Customers pay more for a worse product.
2. "Open source has failed, there's no way to monetize it", so we get DynamoDB and Aurora and S3. Amazon wins, Customers (mostly) win (unless Amazon takes the gun they've now loaded and decides to point it at them)
3. "Its open source, but you still have to buy it" lol ok, all the negatives of closed source with few of the positives of open source. No one wants the source code so they can read it and hack on it, they want it only as a signal for their ability to move hosting providers should they need to, or self-host. Source code usually lasts longer than the people who wrote it.
4. "We'll sell support packages" so now your revenue stream isn't aligned with customer success, because you're financially incentivized to build a product which needs support. Nope.
5. AWS does not have RDS, but does have EC2. Mongo, ES, PG, etc have their own "cloud" offerings, which are really just re-vendored EC2. They tack on a 30% upcharge so they can survive and develop the product. Well, that's what both ES and Mongo do, today. AWS loves this. They make the same amount of money from selling cheaper metal without all the expensive upkeep of RDS. Its the customers who hurt, not Amazon. You miss out on integration points in the cloud platform. You miss out on centralized IAM. You pay more for a worse product.
People keep acting like AWS is a big bully who got big for no reason, it doesn't make sense, the cloud is a monopoly and AWS is strong-arming other companies to get bigger. Maybe to some small degree, but by far the reason why AWS is big is because They Build What Customers Want. End of story. There's no philosophical debate between AWS Product Development and their Customers concerning whether they should build an open source ES. There's just "Jeeze, Elastic has been really screwing us over lately, is there anything you can d--" "Say no more, we've got you, by the way your two hundred thousand dollar bill is due." "Wow, thanks Amazon, no problem we'll pay that right away."
The real thing that's killing these database companies is that databases are a dime-a-dozen. You pick one, who cares which one it is. There's some minutia here and there, do you want SQL, NoSQL, time series, ok you get past that and the rest falls into place. I've sat in the decision making room on this for two or three companies. No one analyzes what the database can do. The discussions surround "where are we hosting it". What options does Azure have, AWS, oh that company has their own hosting platform, etc etc. HackerNews makes a big fuss about how MongoDB has no transactions; I've literally NEVER heard this brought up once as a negative against the product (though, sure, in some very specific industries or use-cases it matters). Version 4.whatever adds a new query operator; who gives a fuck, 99% of database usage is "write thing, read thing back, query for things in a way that SQL could do in 1992, update thing, delete thing." Databases are boring, and the success of the companies who tried to build billion dollar businesses on top of one (Oracle as well) reflects how boring the software actually is.