It doesn’t cost cost google money to show that content. (It does cost someone else who google would be giving a cut of the ad revenue)
YouTube videos actually have some real world disk space, bandwidth, etc costs just to show so if google doesn’t get to show an ad they lose money instead of an opportunity to make money.