When a candidate asks for feedback after not getting the job, if there's an easily articulable reason, I'll generally share it. For instance, I'll let a candidate who asks know that we were looking for someone with more experience in a certain area, or stronger writing skills, or that while the candidate was strong, another candidate was stronger, or whatever the case may be.
However, sometimes the reason would require me to be insulting or otherwise have an awkward conversation I don't want to have. For instance, I don't really want to explain to a candidate that she came to the interview dressed like a stripper, or that she seemed so fragile that I couldn't pair her with that very direct manager without worrying about daily tears, or that she just seemed a little crazy.
Now, you could argue that the right thing to do would be to share this information, hurtful or not. After all, how will these candidates improve if no one tells them what they're doing wrong? And to that I say: I'm not your job coach.
When I take the time to give candidates feedback, I'm generally doing it as a favor. Most companies won't do it at all -- they either ignore the request entirely or automatically respond with something generic and vague. And that's because either (a) they're worried about lawsuits or (b) they're sick of candidates who ask for feedback and then argue about the response. Despite (a) and (b), I'm still generally willing to give feedback, if it's easily explained and not more awkward than I feel like stomaching. But I don't believe that candidates are entitled to it; it's a favor, and it's not standard practice. (That said, I do believe that when a candidate invests a lot of time in interviewing, you should try to give them feedback whenever possible. But I know I'm in the minority there.)
I recently had a guy bombard me with calls and email demanding to know why he was rejected. He was rejected early on, after an initial screen of his resume, and he was rejected because his cover letter made him appear pompous, out-of-touch, and like a huge pain in the ass. Turns out, we were right. He called several people in my office demanding to know why he'd been rejected. I emailed him back and told him we were focusing on other candidates who were stronger matches. He responded by demanding that I call him "to explain exactly what it is" that he lacked. He then proceeded to send me numerous additional emails, arguing that his experience was superior to anything other candidates could possibly have, and suggesting that I was "afraid" to call him since I might be proven wrong.
Now, in a case like this, I suppose one option is to stop worrying about offending him and tell him directly that we rejected him because he came across like an ass. But that's guaranteed to produce further emails from him, and I'm not inclined to get into a long back-and-forth on the topic. I suppose another option would be to offer feedback on the condition that it not result in a prolonged exchange, but frankly, I don't think I'm obligated to help this guy improve his job-hunting skills.
I do think candidates should ask for feedback after rejections. But they can't bully their way into it, and they shouldn't have the attitude that they're entitled to it.