You're right and it's worth pointing out that a lot of open source has the opposite lifecycle: the authors make a thing, aren't sure how to sell it, so they open source it and hope to eventually sell something peripheral, i.e. "open core" with paid plugins or enterprise support.
In these cases, open source isn't a gift so much as a marketing strategy. So it makes sense the maintainers wouldn't see LLM training on their code as a good thing; it was never a "gift", it was a loss leader.