Easy access to the videos without having to download them from Google (and without Google trying to stop you from scraping them, which they will) is an enormous advantage. There's way, way too much on Youtube for to index and use over the internet, and especially not at full resolution.
Google is making money hosting these videos, and users are freely uploading them. A competitor would have to scrape/download them, store them, process them all at their own cost, along with having much less metadata available (Which videos are most viewed, which segments, what do people repeat, what do people skip, what do people watch after this video, which video generates the most ad revenue, etc.)
This isn't certain. Google do not break out Youtube revenues nor costs. Hosting this amount of videos, globally, redundantly, the vast majority of which are basically never watched, cannot be cheap.
It's entirely plausible that Google's wider benefit from Youtube (such as training video generation algorithms and better behaviour tracking for better targeted ads across the internet) are enough to compensate for Youtube in particular losing money.
Videos without metadata is not as useful. Google also has details on which videos are watched where. Which parts do people skip. All the videos that are blocked for various reasons. The performance of videos with humans over time and so on. They can focus on videos with signals that indicate that humans prefer those videos or clips.
Do they, though? Are competitors actually downloading all these videos? Supposedly there are 5 billion videos on YouTube (https://seo.ai/blog/how-many-videos-are-on-youtube), downloading all of that is a LOOOOT of data and time.
I mean, you could limit yourself to the most popular or most interesting 100 million, but that's still an enormous amount of data to download.
Just wanted to mention the latter, you don’t need all videos. It’s indeed a lot of data but doable so I am not sure if I would count this as big advantage.
presumed datasets:
1. its petabytes of data in the public/listed/free tier videos.
2. there's paywalled videos.
3. there's private/unlisted videos.
google will have access to all of these. competitors will have to do tons of network interactions with google to pull in only the first set. (which google could detect and block depending on how these competitors go about it)