VC logic is that a company does not need to be profitable for a VC’s investment to be profitable. Simply getting the company to an expensive IPO is all that is required for VCs to make money. And that is possible even if the company has never made a dime.
This is the case for all investment, not just VC. Even cash, gold, real estate etc works on the same principle. It is valuable because other people find it valuable, not because the thing will give investor the profit in itself, just the valuation are expected to grow.