We do tell people that we're banning them, and why: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... - but only once the account has an established history. We treat new accounts differently, for reasons I've explained before. I'll try to dig that up... Edit: here you go:
https://news.ycombinator.com/item?id=21288858
https://news.ycombinator.com/item?id=20666742
https://news.ycombinator.com/item?id=20289994
It's a bimodal distribution in that we treat these disjoint groups very differently. With established accounts, we warn them before banning, usually several times, and then tell them we're banning them and why. With new accounts, we don't say we're banning because the population of banned-new-accounts is overwhelmingly spammers and trolls, often serial trolls who have been banned many times and know perfectly well what they're doing.
Link to the entire comment: https://news.ycombinator.com/item?id=23686672