

This is really more a case of possibility #2. Specifically, why are you rolling your own in the first place? The whole reason the output of the AI is “probably flawless”, is because this operation already has a million implementations. What’s the value in conjuring up another one and adding it to the code that needs to be maintained? Yeah, binary trees aren’t terribly complicated, but neither is struct Vector3 { float x, y, z; }; or any of its operations, until you realise you’ll be running those operations an awfully lot, so it would be better if it had the right alignment and SIMD instructions were used in its operations, and of course, if you have Vector3 you’ll probably also need a Matrix4x3 and a Quaternion etc., so in the end it’s just better to use an existing solution.
This is what I mean with turning good devs into mediocre ones: the worst solution becomes the easiest solution, so that’s what people will lean towards.
Of course, there can also be situations like you have a very specific use-case and using something off-the-shelf would be sub-optimal, or you’re working with old code and making their own was the decision the previous person or your dumbass past-self made, so that’s just what you have to work with. But the AI is going to struggle more with those cases too.
Lastly, I also mentioned “energy”. If you’re trying to put in words things that aren’t easily conveyed in English (or any other natural language) all the time, you burn through your cognitive endurance like crazy. This is why you don’t want to be in a highly technical meeting in the morning, so being in one all day with a moron you can’t really come to common understanding with (beyond the size of its context window) is even worse.

They are very different, actually. A compiler has a well-defined task: it should take any valid code written in a particular language and generate machine code or intermediate code that does exactly what was instructed in the input code, in accordance to the rules of the language. The exact sequence of opcodes it generates from a given input may not be completely predictable, because there are multiple ways of achieve the same result and different compilers will make different choices in different circumstances, but there should be a clear relationship between the behaviour of the output and the instructions in the input, and if there isn’t, that’s a bug, pure and simple. There’s just not that much room for hijinks, which is why even a proprietary compiler like Visual C++ is more strict about following the standard these days; being the outlier risks irrelevance. But that’s only possible because there’s a clear, shared idea of what a compiler should do.
But with an LLM, the input is any kind of text, and the output is something derived from a large, but finite, fuzzy possibility space, with no understandable relationship between the input and its output. This makes it difficult to reason about failure states. Let’s say there’s a bias in the model that makes it consistently favour using one library over another. Because most people will just take the path of least resistance, that will result in that library becoming more popular at the expense of the other, whose funding may dry up as a result, so this is an issue that affects more than just the users. But what is causing this bias? Is it there intentionally or just a result of the library already being more popular? Is the bias even there to begin with or am I just seeing it because of my own biases? It’s all very hard to say. Just proving that the bias is there and what’s causing it is going to be a lot of effort, as is removing it even with the cooperation of the maintainers. And if they’re not cooperative and I’m on my own without the funding available to them, then forget about it.
Of course, biases don’t just exist in AI models, like how QtCreator is clearly biased towards Qt. But it’s right there on the tin, you knew what you were getting into from the start, and if you don’t like it, there are any number of alternatives. But because of their high cost, there are only so many LLMs of a certain level of capability and they’re all basically immune from accountability, because everything exists in this fuzzy space of reasonable doubt.