You’re getting somewhat usable results from AI solely because someone else in the world has already done something exactly the same or very similar to what you wanted to do. This isn’t all that unlikely to happen because there aren’t that many different ways to make a form receive and display data, for example.
Now, if you take someone like me, who is constantly creating new things or new ways of doing things (and no, I won’t describe them because of trade secrets), AI just gets in the way and can even be a serious security risk. The only thing AI has been somewhat helpful with here is acting as a “Google summary,” and since I’m the one who decides whether the AI’s suggestion has merit or not, it never touches the code itself.