They're perfectly happy being an API provider, where they're not selling their tokens at a loss. My guess is that they're counting the losses for Claude Code Max plans as R&D: what does usage look like if people don't have to worry about the cost of tokens? Because someday they won't, and Anthropic want to skate to where the puck will be, not where it is.
You don't go after OpenCode because they allow for arbitrage. You go after them because they can decouple your model from your brand.