Seems like a strange criterion. Would programmers hired to do HR be fulfilled in their jobs? Would they last very long? How does that even work? Do you slip a javascript requirement in the HR position posting? It just seems like you might be missing out on some great HR talent with such an arbitrary requirement.
It depends if you have 1 HR person or something like 10,20+. If it is a large department, having someone from a programming background that is looking for a change could be a big asset if the HR department is primarily dealing with programmers.
Programmers have all sorts of side interests. I wouldn't mind studying and potentially working in linguistics for a while; I don't see why there wouldn't be someone who's into working with people in an HR-ish role.
Digressing for a moment, what about the reverse, i.e., how long would the average HR consultant last as a programmer? They'd have to organize a swap: the programmer hands over their brain, the HR consultant their mendacity.