Yes, it’s never been (mainly) a problem of power, the iPhone could probably too. It’s a problem of concept. A tablet isn’t a computer, besides what Apple may say, so it doesn’t run a desktop OS.
I really loved the concept of docking your phone to enter “desktop” mode. Your smart phone would literally be your only computer (with exceptions, of course).
I know some phones did it already. I think Apple could if they wanted to.
If no MacOS on an iPad, at the very least Apple should give it a “docked” mode when using an external monitor, or something.