If you ask ChatGPT to write you some code, it will. If someone else asks them to write some code solving the same problem, then it is possible it will write the exact same code. This means, the AI can not be considered a worker for hire. It is, in fact, a function.