For one, on the margin people are willing to pay a lot for slightly better models. I know personally the value the LLM adds to my workflow is considerably more than the $200/m I pay the frontier labs. I have no interest in optimizing that to get it slightly lower. There are a very vocal minority that optimizes this or companies whose LLM expense is marginal, but I think that's the minority (correct me if I'm wrong, curious what their customer base looks like)
Enterprise is how Claude/OAI make their money. Enterprise companies absolutely optimize around costs for infra, it's like an entire job category.
Also the actual LLM is a tiny portion of the value added. Anyone that tried to build agentic solutions from LLM apis quickly realizes that a huge value is the Claude Code / Codex harness. There are open source implementations like OpenCode but they're not nearly as good.
Claude and OAI are not valued at $1T because of their harnesses
Think about it another way. Consider how much money Microsoft spends on maintaining Excel. There are open source alternatives that have >90% of the functionality, they'll even work w/ Excel files and generate them. Google sheets is probably 99% and available to everyone and better in a lot of regards. But the immense value spreadsheet software produces workers above the $100 or whatever a year makes it so that there is a real moat and no one bothers exploring alternatives.
Enterprise excel is like $50 a month, the closed source labs charge orders of magnitude more than that per user per month for enterprise, and want to charge more if they can to maintain their valuation. I spent $20 in an afternoon yesterday using my work plan for one workflow for reference, I probably spend at least $50 a day and I don't even do that much coding anymore.