> The code is 'correct', but it's just not what any of us would have written".
I'd fine with not what we'd have written ... if it worked.
Trying ChatGPT for a simple one page of HTML JS having draggables, I said clamp touch point to visible viewpoint. Fine. Then I said add 3x drag gain. It put that after the clamp, whereas anyone/thing having an ounce of intelligence would have urecognised the only possible purpose of the clamp and so put the gain before.
This is fundamentally why we cannot trust stochastic parrots to code. They lack the human's understanding of purpose which cannot be abstracted from the code yet is essential for success.