If you think that HR department is a charity, then you do not really understand what HR department does. Try running a company without one, and see how much money you lose.
Google employs lots of people who work on things which do not directly generate revenue themselves, but which do contribute to the company's overall profit and loss. Such as HR.
However, based on Google's bitchy blog post, were they to treat all such projects and departments equally like Google News, thousands of people would be pink-slipped tomorrow. Get it now?