They bought Maps too.
However, it would be silly to imply that either of those products were nearly as popular and solid/full-featured as they are now, by many magnitudes. Those products today are nothing compared to what they were back then. Even for me, as someone who has been using YouTube since way back then, just randomly seeing screenshots of the old YouTube throws me off and makes me go "is that what it really was back then? it doesn't even look similar at all".
And no, I don't mean it in a bad way. Up until about Honeycomb (3.0) or Ice Cream Sandwich (4.0), Android imo felt more like "minimum viable product that technically has feature parity with Apple and some more, but you have to have some really good justification to willingly pick it for any reason other than the price", and the experience of using it felt entirely subpar. The release of 4.0 (or 3.0, i honestly forgot) was when Android started feeling like an actual solid competitor to Apple for the first time, and not just an obvious "second best option".