1) Make sure that job ad reaches people who are likely to be good candidates.
2) Job ad is attractive enough so that good candidates will actually apply.
3) Handle the administrative side of the recruitment process: paperwork, visas, appointments, expenses, tickets, re-location, contract, security checks etc.
4) Make sure the whole process complies with the legislation.
5) Streamline and expedit the whole thing from the very start to finish.
In my eyes HR is not qualified to make a judgement if a candidate is any good at programming.