(I'm being a complete armchair expert here, since I have no idea of the actual state of the YouTube backend. It might look simple to me but I'm sure it's not in reality . I'm curious to see what would be the best way to optimize a feature like this one!)
It of course may not be as simple as your random hobby projects, but Google has the manpower that is proportional to the complexity of YouTube.
I mean, you say that, but... what is the alternative? YouTube is the host of some of the most valuable content on the internet, in my opinion, and some (some!) of the most valuable content produced by humanity. And it allows anyone to access it for free, with incredible technical specs. This is a non-trivial problem, and incredibly expensive.
Sure, I dislike that they play around with features that I think are valuable. But given everything else I get from YouTube, I'm not exactly complaining, and for sure I wouldn't wish them gone without having some idea of what could replace them (and I don't think that exists).
One specific idea that could see reality some day is a site that hosts proprietary videos on their own servers (for professional and paid creators) but also lists non-commercial creators that store their data in their own cloud platform of choice or indeed in the P2P network. The main point would be to not rely on dark patterns and ads in supporting this business but offload as much storage/bandwidth as possible to other servers.
I said they have to go cause I am slowly having enough of their policies. Sorting by old is a minor inconvenience but having 15-45 (!) minute long ads is just ludicrous (I listen to podcasts to sleep). I've also heard some voices about an anti-adblock campaign being rolled out, I wonder how that goes...
What is old is new again.