I can't remember where I read this, but as far as I understand, Google is still losing money on YouTube.
They might still be 'losing money', but 3.6 billion/yr is plenty of money coming in.
The market sees it like this: Their costs are high because they (Google/Youtube) are investing to support high growth. At some point the growth will taper off, and so will the investment (because you invest to support larger numbers in the future), but the money keeps rolling in.
Google has deep enough pockets to invest in that for a long, long time.
Google also gets a whole pile of AV to do speech-to-text and other analysis on (before any additional compression) that no other firm gets a chance to do.