If they end up somehow building strong AI, then the investment will pay off in huge multiples and will absolutely be worth it.
If they don't manage to create strong AI, but manage to create a better search engine that somehow replaces Google, then it will be worth the investment (for comparison, Google profit is on the order of $100 billion per year).
There are a lot of other potential products that could bring heavy revenue, even without strong AI. AirBnB has $2billion a year in net profit, which isn't great but it's conceivable that even with the current crappy AI product, OpenAI could make a reasonable amount of revenue. With billions of potential customers, they don't need to make a lot of money off each person.