Samsung did it with DeX; so now you have your mobile OS with mobile apps inside overlapping, dynamically sized windows.
For emergency use, it is ok. For a prolonged one, a separate laptop is vastly better experience.
Microsoft pretty much did nail the software side of it, but nobody really cared.
https://www.microsoft.com/en-us/windows/continuum
This is pretty much exactly what you're looking for. A phone OS on the phone, plug it in, get a desktop OS on a desktop. It worked pretty well, even for the limited hardware at the time.
If a device supports Displayport Alternate Mode on USB-C, there are docks that work like how you're imagining. But I do agree, for a lot of devices the mobile OS just doesn't really have a great desktop experience.
If I could just plug in my phone to their USB C monitor that is already connected to a mouse and keyboard that'd be amazing for quickly using YOUR device.
Why would anyone need this? Because I could have my ssh keys and some software on it - sure I could have a bootable USB drive and try to boot their desktop (or laptop?!) from it... but that seems more involved than being able to converge your phone.
It's just that nobody nailed the software side of it. Apple could but they just don't care. Linux tried and they will keep trying