Most startups in the tech sector are exactly as you describe. And that's the point. Eventually, one of those startups finds something that can turn a profit. They build something that people want and are able to push on a few levers and ramp up profitability.
Apple, Google, Facebook, and many more, started out as small startups that barely made profit and lived on investments. Eventually, they got their shit together and became some of the world's largest companies. However, most startups that existed at the same time as them, heck, may have even had similar ideas as them, crashed and burned. That's the nature of venture capital. Throw a bunch of money at a bunch of ideas and see what sticks.
And if you think that's a very haphazard way of investing, you're right, it is. But as a percentage of total investments made by many funds, VC funding is a very minor portion, so they can somewhat afford to make these bets (and lose).