Most likely its training data included countless Space Invaders in various programming languages.
replies(6):
i have this feeling with LLM's generated react frontend, they all look the same
Models don't emit something they don't know. They remix and rewrite what they know. There's no invention, just recall...
There is no understanding, regardless of the wants of all the capital investors in this domain.
(I have much respect for what you have done and are currently doing, but you did walk right into that one)