Blatantly anticompetitive behavior where you (ab)use your dominance in one sector (i.e. YouTube) to choke out competition in another (i.e. make it slow on competing browsers) is illegal in the US and the EU, at the very least. I don't know the specific laws or acts in play, but that's the sort of thing that triggers antitrust lawsuits
So this is part of a larger adblock checker, if the ad doesn't load within 5 seconds, it fails and triggers the adblocker warning. Since the ad should load in 3, they've set it for 5. If you have ubo, you won't see the warning that it then wants to pop up, it just seems (and is) a 5 second delay. Changing the UA probably removes this from Firefox because then the clientside scripts will attempt to use builtin Chrome functions that wouldn't need this hacky script to detect the adblock. Since they don't exist, it just carries on.
Some people are reporting it happens when your accounts get flagged by YouTube for blocking ads and that using a private browsing session can be used to bypass it, so it's possible this isn't a blanket thing?
Either way, they can go fuck themselves.
If you're on Firefox and using uBlock Origin (which you should), you can add the following to your filters list to essentially disable the delay:
It doesn't fully disable it, just makes it almost instant, because Google has been doing shit like looking at what gets blocked to combat ad blockers recently.
It's bizarre how blatent this is. Google has so much power over web standards that Mozilla have to work really hard to make firefox work, but YouTube don't bother being subtle or clever and just write 'if Firefox, get stuffed' in plain text for everyone to see.