I admittedly haven't been at Google for a long while, but they were headcount-constrained the entire time I was there.
It depends. At a certain scale, strategically adding headcount can absolutely increase profit. It doesn't seem outrageous to think if a team of 20 engineers can improve efficiency by marginal percentage points for one component it can have enormous financial repercussions.