This problem, either on the legal or the quality/security side, cries for proper regulation. With the growing use of AI and cloud-based solutions, this problem will be much more severe in the (not so far) future.
In the 80s', when I started programming, the formula was so simple. Yes, we used C, then C++ and a lot of Assembly, and some people said: "The ASM is so difficult" or "The pointers in C...". But I always knew what I was doing, which part of the program did what, and more importantly, where it came from (from my brain). Then the programming languages became more and more complex. Nowadays, I'm not always sure what is happening in the background. It's true; I can read all the source codes with much time and energy, which are insufficient anyway.
An example: If I use ASP.NET + Angular (which is typical nowadays, and you can replace them with React, Vue and so on), naturally, I need some SQL also. I may use Visual Studio for this project. In the first step, I must load many NuGet packages as I also need many packages for the Angular side and EF for the SQL. The NuGet and Angular packages and the Angular, C#, EF, and ASP.NET are changing so fast that I barely follow even the changing list. I have no chance for the source code itself.
Meanwhile, the CoPilot came into the picture, which may help or lead me into the forest. As @IowaDave has already mentioned. (Yes, IF I want and can separate the front-end and back-end, etc. But most of us can't, because of the costs, and the Financial Department...) The complexity of these systems is growing continuously. Where is it lead?
As I see, in the not-so-far future, we will not be able to avoid the "help" of AI. But, the AI will (already is) use an immense and puzzling database of "knowledge", which comes from the "cloud", and I won't have any chance to verify where it comes from and what it is doing exactly. If I start using systems to check it, those systems become more unverifiable also. These all begin to get out of control. When a "helping" system says that one day: "X and Y deprecated, I changed the solutions at 2645 places, in 376 files, added 143 new files and deleted 78. Here is the list." I don't want to be there. Good luck checking it from the legal and programming side.