YouTube is not losing money, it's a significant contributor to Alphabet's overall revenue.
They are not struggling to maintain it, they're trying to milk the cash cow...
There's no contradiction between those two ideas. Something that loses a lot of money is more likely to be a significant contributor to revenue, because you can't lose a lot of money without seeing a lot of use.
But why would anyone care about revenue? Is it a significant contributor to profit? Last I heard, Alphabet doesn't even provide a breakdown of how much of its money comes from YouTube.
If you think there can be a free platform (truly free) I highly encourage you to look up the fate of youtubes biggest competitive threat of the last decade: Vid.me, an actually whole hearted VC funded attempt to dethrone youtube. And it worked great for a bit..
Many sites that are not behind the wall are providing part of their content through embedded Youtube videos. In order to see that content you need to agree with tracking. Those sites use Youtube just because it is often considered as standard.
Youtube is go-to platform for video publishing because it started as free platform. When they captured this segment of web, they have overloaded it with ads.
I do not expect anyone serving me for free. But it is not bearable when everything and everyone expects you to use these walled gardens.