Finding the Cause
Most of the time you will get the 'Dear Applicant' letter from civil service or human resources, which is a boiler plate letter for all. Take a close look and see if the letter lists a person to contact for questions or if there is a review process.
No, I have never heard of any place sending out this application obituary by mistake. But, you do have the right to inquire why you were rejected. Call or follow the recommended procedures. Do not try to personalize this. Remember, this is business—not personal. Remember the person who answers the phone is an employee who does not make the decisions but will direct you to those who can help you. Do not air your vile on them; they just work there.
Once you get a responsible party on the phone, again try to be nice and ask reasonable, professional questions. Just in case you ever reapply, you don't want to be a hothead with them now, because they will remember you later. Additionally, if you are in a metro area, many of the HR types chat with one another; they could give a heads up in a positive or negative about you to their colleagues. Is this supposed to happen? No. Does it happen in reality? It could, so don't risk it.
There's also a possibility that something went wrong with the application itself. Did you fully understand the application process and follow it to the letter of the law? I have seen rejections occur because applications were not filled out properly. Or it could be that accompanying paperwork such as college transcripts did not arrive in time to pair it up with the application. Request a review for the next process. Another example is that there is a difference between a birth registration and a birth certificate. Most agencies will ask for a raised seal copy of a birth certificate. These are not hard to get, but if they ask for that do not think your baptismal certificate will suffice.