In this context, "no one knows how it works" is not a technical statement. Instead, it's a shorthand for, "the actions of this system cannot be predicted by anyone."
We're talking about the social definition of knowing how something works, not the technical definition. I don't know how to build a car, whether EV or ICE. I can describe the high level principles, but I don't know all technical minutia of battery chemistry or the intricacies of engine timing. From a technical perspective, I don't truly know how a car works.
But in more every day terms, I do know how a car works. In other words, I know how it will behave depending on what actions I perform on it. I know what will happen when I press the accelerator or the brakes, operate the steering wheel, etc. If someone tried to give me a lecture on how to operate a steering wheel, I might rightfully be annoyed and tell them, "I know damn well how cars work!"
That's the context to understand statements like this. Obviously we know how these things are built; we built them. But no one truly knows how these things work in the way the average person can know how a car works. I may not know how to build a car, but I know how to use it. I know with a high degree of reliability how it will respond to the commands I give it. The same cannot be said for these AI systems.