Earlier quoted context omitted.
Elastic Co isn’t profitable by definition it isn’t “doing fine”. From their SEC filing: https://www.sec.gov/Archives/edgar/data/1707753/000119312518... We have a history of losses and may not be able to achieve profitability or positive cash flows on a consistent basis. If we cannot achieve profitability or positive cash flows, our business, financial condition, and results of operations may suffer.
You're right they're not profitable — and neither is MongoDB — but the point is that AWS launched an Elasticsearch service 3 years prior to Elastic having a very successful IPO supported by stellar metrics (also found in the SEC filing you linked). So the statements made at the beginning of this thread are probably a bit premature.
In reality long term profitability is the only metric that matters for a corporation