Coding error
Given they did not know how to code, I imagine if they had left turbo mode off, they still would not have caught the error and would have still wiped the D drive. I mean, if it printed up "DEL /s D:\*.*' it'd be pretty obvious that's not what you want. But if you've got some Python code (for instance) and they aren't a programmer it'd be very easy to miss that it didn't change the working directory (or the working directory had a typo so it *intened* to change directories but didn't), something like that.
If someone is having an assistant write some functions or code fragments, taking a look at them to integrate into a program.. have at it. But if one doesn't know anything about programming, I would seriously recommend setting up a test environment to run it in. I.e. run a VM, copy some pics in, the program would have still deleted the wrong files (probably) but then one can just roll back to a pristine snapshot.
I'll just say.. I've toyed with having an LLM write code. It was passable but not outstanding, and generally needed a little work (which I fixed myself rather than trying to like iteratively prompt it to fix whatever). But vibe coding (where someone who knows nothing at all about coding just 'vibes along' and lets the LLM write everything?) Total madness. The quality of code made is just too hit-and-miss, and all too often non-progammers are not going to be precise enough in requesting what they want it to do, leaving it free to do something unexpected even if it strictly follows the parameters it was given in it's prompt.