It doesn’t matter if they’re making money. Google/Alphabet is a for-profit company. A big part of this means they have to make as much money as possible. MBA programs literally teach that any unrealized potential profit is lost money.
They could rake in a trillion dollars in ads, and they’d still do this if it meant they could get 1.1 trillion instead.