Im guessing the lock-in is strong enough that they can eat the reputational hit while getting meaningful training data by subsidizing the free users.
Github has a decade of positive reputation to deal out, I don't see Grok or OpenAI jumping in and competing with that.
I suspect the 1/4 (?) ownership by Microsoft plays a factor into OpenAI.
Otherwise I reckon they’d have cloned GitHub already; possibly with a “Mirror to CodexHub? Free usage reset”.
I wanted to set up a Cloudflare static page and all the tooling is completely designed around Github. If you want any other service, you have to roll it yourself.