Opera browser was not profitable for like 15 years and still became rather profitable eventually to make an attractive target to purchase by external investors. And even if not bough it would still made nice profit eventually for the original investors.
Sure, but they were making tons of money elsewhere. OpenAI has no source of revenue anywhere big enough to cover its expenses, it's just burning investor cash at the moment.