It isn’t a simple money in, money out system. You’re taking higher value money in one year, and paying out some money that’s worth less later (inflation)… while at the same time, you’re investing the pool of money you collected, and earning returns on that before you pay out claims - claims that you’ve already negotiated down in price. But by the time the healthier customers need to start making large claims, they’ve already both subsidized the claims of other customers, and made the insurance company more money than they’ll draw in claims.
It's a simple money in, money out system. Health insurance isn't like homeowner's insurance where the insurer accumulates and invests a pool of money in anticipation of occasional rare events like natural disasters that cause a spike in claims. Medical expenses across a large patient population are very predictable and there is no significant carry over of premiums from year to year. In fact, under the Affordable Care Act (Obamacare), it is actually illegal for most health insurers to do that. Any excess premiums collected must be returned to customers at the end of the year.