Perhaps I'm biased because I've been in a few places where HR did the mainline jobs in the firm prior to becoming HR. Those scenarios turned out extremely well, though perhaps we didn't get the best deals in health insurance.
I've also seen (unhealthy) environments where HR's primary job was to protect the company from lawsuits. That's not great either.
In general I've counseled people not to put their career in HR's hands, but that's still a long way from calling it a near-useless function. It frequently turns out that way, but it has the potential to be much more.