How is SpaceX not making money?

Total investment is 20-40B, rent to Anthropic for 45B over 3 years.

Anthropic is also profitable now.

Anthropic is not profitable and does not expect to be revenue even until 2028. They are just losing less billions per year than everyone else.

As always, free cash flow and unit economics are more interesting than net profit.

By which metrics Anthropic is making a lot of money.

how exactly can you assume they have unit profitability

Plenty of analysis on this point, the inputs are not secret. Check out Semianalysis for example.

They have something like 70% margin on inference.