A license is a choice. It means you choose to not gain revenue by directly licensing the IP. Instead, you choose to put the code out there without any further legal obligations on your part as well as those who use that code.
It also means that you have to find alternate ways of making revenue e.g. by providing consultancy, building services or licensing the trademark (which is an entirely different ball game from open sourcing the code!).
The trouble isn't that Amazon decided to use ElasticSearch in their own offering. The trouble is that Amazon simply out-competes ElasticSearch with their own product when it comes to consultancy, services, etc.
To add insult to injury, Amazon made the mistake of leveraging the ElasticSearch brand a few times too many in ways that just rub the ElasticSearch people the wrong way.
Of course, the founders of ES could never predict how successful their product would become after a decade. There are plenty of open source products engineered by commercial companies that never catch the eye of behemoths like Amazon.