PC operating systems are, at least to a broad degree, generic. That's because a huge amount of backwards compatibility is built right into the PC architecture, much to the delight or chagrin of everybody depending on who you ask. There's silicon on your processor's die right now that's doing fuck-all except ensuring that if you were struck by the perverse urge, you could boot MS-DOS 1.0 onto it even though it's virtually guaranteed that you never will.
Phone operating systems absolutely are not generic, because each phone model is basically unique unto itself in terms of what hardware is in it, and backwards compatibility is not in any way a design goal. Furthermore, the entire package has to be rolled into a single unified ROM image.
There are proprietary core components in phones, notably their SoCs (systems-on-a-chip) and modems (which are often built into the SoC) which their designers jealously guard and are loaded down with patents and other IP restrictions. This hardware requires closed source drivers which must be updated or at the very least recompiled for new kernel versions if the OS is to be updated. That's for Android, anyhow. It's even worse for Apple devices, because they're entirely closed and Apple is in total control of both the hardware and the software. At least they bother to support their own devices with updates for quite some time, but even they're not absolved of fuckery -- see, for instance, the deliberate slowing-down-with-updates scandal from a few years ago.
If nobody is providing source code or compatible binaries for the core hardware your phone needs in order to work, at minimum it's going to be impossible to update your device beyond the kernel version that was last supported on it, even with a custom ROM. And all of this is before getting into locked bootloaders and other chicanery that prevents you from running your own code outside of user space on the hardware even if you had the code to run.
At the end of the day: The hardware vendors are absolutely not interested in providing driver support to end users or source code to anyone, and the handset makers and most especially the cell service carriers, at least in the US where the majority of people buy or lease their phones from said carriers, literally have a vested interest in dropping support as soon as they can get away with it. That's because rolling out updates to oodles of individual phone models costs money to do, but they only make more money off of you by selling you a new phone.