Now granted I’ve rooted every phone I’ve had since the HTC Incredible, and I always check XDA forums before buying a new one to see if there’s a decent development community. And in recent years there has been a SHARP drop in the % of manufacturers that even allow their bootloaders to be unlocked - I don’t think the last like 6 samsung galaxy’s have ever been possible to do it. But there are still plenty, I’ve managed to find a kickass flagship model every year or 2 years and upgrade through at least 2 or 3 versions of android (I always buy last- or last-last-gen models used for <$200 so they’re typically a bit out of date already).
I couldn’t imagine any other way honestly. I absolutely love rooting & flashing custom roms, and it’s kept all my phones practically as young and snappy as the day they originally released...or better
If Linux didn't already exist it would never have been possible to create since all computing platforms are getting more and more locked down.
You can also run mainline linux on the Nexus 7 2012 but you lose wifi support.
Most alternative OSs just use the patched kernel that shipped with the device.