In the U.S., anything machine generated is uncopyrightable.
Why would you put uncopyrightable code into your codebase?
It's more nuanced. If I even have a few lines I can prove are mine, those parts are copywritable in the same way Pride and Prejudice is public domain but pride and prejudice and zombies is copyrighted.
Even worse...unmaintained code. Only the human-written one has a maintainer. The other one plagiariased by AI is instant legacy code
Autocomplete has been around for decades
I think if you dig a little deeper you will find that the answer is not so black and white.
Why wouldn't you? Your codebase (if you're a business) exists to make you money, people being able to copy some unknown portions of it without further license if they somehow legally get their hands on a copy of it seems entirely irrelevant.
PS. I think this is much less clear and much less settled law than you are suggesting.