I'm not sure this is the correct question. Every company has cost centers and profit centers.
Historically, for example, Playstations were sold at a loss and the games were sold at a profit and a licensing fee to offset that loss.
In the more modern world, Steam and Apple and Epic Games all charge a percentage-based commission for the games and in-app purchases their games have (at least some of them charge the latter). The cost of keeping the game in their catalog is very low compared to the price they charge. The markup is very high; but, it does offset development costs throughout the company. Those development costs may or may not help drive traffic or even use the services that the money-making services boulster, but the money-making services do help pay for it.
> those are revenue figures, not profit
> $10 billion from Google out of $60 billion in profit is significant