It's actually a common practice for some to apply on jobs with completely under-qualified resumes and sue the companies after getting an early rejection for discrimination.
Not as much as the tort reform-obsessed would have you believe.
I got rid of him eventually, but I can easily see such a conversation ending in lawsuit-enabling remarks by me. Hiring, especially non-hiring, is a lot about gut feelings, and those might be tricky to explain legally.
So I would say it's definitely safer to keep quiet.
I've had some awkward conversations as a result of this, but nothing I regret.
I'm fully aware that this doesn't scale well, but it works fine for me.
I can see where it might be problematic to go into reasons why they didn't get the job, but I'm having a hard time seeing what risks a simple notice informing them they didn't get it causes?
This may be enough to give the rejected applicant ammunition for a law suit. I've been to several interviews where I've had to dig out that what they say they're looking for doesn't match the position they actually want to fill.
I'm a straight, white male in my thirties, so discrimination is far from my mind. Other people may form different ideas, though..
On the other hand, going silent after there already has been some communication established does not seem to be smart. But I am not a lawyer and there could be some sense in that too.
However I see nothing wrong with a "You have not been selected on this occasion", though I make a point of not entering into a conversation about why because of the risks outlined.