It's the law in almost every state, though.
content.next.westlaw.com
I am not so sure. Mind you, my perspective is from an atheist who has little use for men of the cloth... but...
If the purpose of confession is to be able to seek console, can you really do that if you have a suspicion the clergyman is going to run right off and report you to the cops?
Most religions require people to make amends when they confess to a sin. Again, no fan of the Mormons, but I'm sure even they get that right.
So a clergy-penitant privilege is meant to encourage resolving a problem. Just like you should be able to discuss your actions with a lawyer, without him turning you in. It's to encourage free communication.