They’re not getting it for free. They pay video creators. And they know that the more they can pay them, the more and better content they will get.
barely, most of that payment is from premium subscribers and memberships, people who spend their own money on this, youtube gives them a share of the ads, sure, but ads are basically a fraction of the majority of most youtuber incomes these days.