You’re making a big assumption. LLM providers aren’t necessarily taking a loss on the marginal cost of inference. It’s when you include R&D and training costs that it requires the capital inputs. They’ve come out and said as much.
The Claude Code plans may not be operating at a loss either. Most people don’t use up 100% of their plan. Few people do. A lot of it goes idle.