It's hardly surprising to see a so-called 'AI system' (If you can even call it that) suggesting and generating broken code. A single typo is enough to confuse it and give you the wrong implementation that won't compile. [0]
The examples all look cherry picked for presentation; but the ones who had access to Copilot early didn't even stress test it, yet it still generated garbage. And it took 1 in 10 tries to get it right. [1]
Of course, we'll hide behind the 'Technical Preview' argument but since the core of this 'AI' (GPT-3) is a black box system, we'll probably never know why it is generating the code it is generating.