> I don't get why they didn't just insert the ads into the video stream directly on the server side.
That's *one* of my recommendations.
> That would make them harder to skip.
It would make them harder to skip *automatically*. But it would mean that the normal play-position controls (e.g., the 5-second skips forward and backward, etc.) would work the same for the ad as for the rest of the video. This makes the UI *consistent* which is a good thing for the user. This is probably WHY they don't do it, because they're afraid everyone will skip-forward five-seconds at a time through all the ads. And yes, a lot of people probably would. I still think it's what they should do. On the other side, downloaders like yt-dlp would fetch a video that includes ads, and YouTube could *fighting* such tools and possibly even make "download for offline use" an official feature and pop a download button straight into the UI, why not. Which would be really nice for people with spotty connections, among other things. (And yes, technically inclined users would be able to edit the ads out of the downloaded videos, but realistically, only a small percentage of viewers would do that, and only if they were planning to watch the thing more than once or show it during an event, and the latter would be something YouTube and/or the copyright holder of the video could go after with lawyers if the event is sufficiently large and high-profile to matter.)
> it would suck for viewers
Honestly, I think it would be an improvement for users who don't use an ad blocker, for several reasons.
1. As mentioned above, the UI would now be consistent, and that's a big win.
2. In the event you see an ad you actually want to go back and watch again (wholly or in part), e.g., because it's funny, you can easily do that under the proposed system. Under the current system, you can't. This is cool on its own but also makes it significantly easier to incentivize advertisers to make ads that are actually entertaining, something I feel strongly that YouTube ought to be doing anyway.
3. In one fell swoop it kills about 95% of YouTube's current large raft of really annoying bugs and performance problems. It automatically eliminates the bug wherein the ad system tries to load an ad and fails for unknown reasons (yes, this happens frequently even when there is no ad blocker involved) and then video playback stalls indefinitely waiting on the ad that is never coming, and the whole page has to be reloaded. It fixes the bug wherein playback is paused for too long during an ad and another ad tries to load during the ad, causing the UI to lose track of how much of the actual video has been played, and the ad just loops forever until the page is reloaded, which places the player back at the beginning of the video. It eliminates the situation wherein leaving a video paused for more than a few minutes guarantees you new ads when you come back, even if you just watched ads right before you paused. It fixes most of the bad interactions between the YouTube interface and tabbed browsing (in particular, when the user queues up multiple videos in tabs, and then wants to watch them in turn). If the ads in each video aren't changed out too often, it allows users to engage with the ads in the comment section. And finally, this also allows content creators to easily see what ads are being shown with their videos, and opens the possibility for the site to add a mechanism for them to object to certain ones (e.g., I've seen the algorithm pair ads for alcohol with content that was obviously intended for underage viewers; this would allow that sort of thing to be reported and fixed, on a per-video basis).
So I think it would actually improve the situation for users who aren't using an automated ad blocker; and as for users who do use an ad blocker, YouTube doesn't have any interest in preserving their experience, so that wouldn't be a consideration from their perspective.
There is one small downside. If ads are allowed to be however long the advertiser wants, which I think is currently the case, this would break timestamp links. The obvious solution to that, is to only accept ads that are certain lengths, and when swapping them out, always pick ones that are the same length as the ones that were in the video before. Television used to have standardized lengths for commercials, so obviously it can work. The same advertising campaign can even have multiple versions of the ad, for various-length slots.