E.B.
I would seriously consider the way you are viewing this. If he tried out for something or expressed an interest in having a particular part in a class activity, but was not selected, he did not "fail". He simply wasn't selected. It could be that perhaps he was not the ideal candidate for the position, or it could be that there were a dozen children suited for the position and only one could be picked.
Failure will be when he's in middle school and has a part to contribute to a group project but slacks off and doesn't do his work, and causes the rest of his group to receive a failing grade because his part wasn't completed. At that point you can say "you failed - you failed yourself, and your friends too".
If your son sees you labeling a kindergarten audition as a "failure" because he wasn't chosen, you will set him up for a lifetime of self-esteem problems and disappointment and well, failure. There will always be a winner and a loser, someone chosen and dozens others not chosen, and if we have tried our best and approached the competition with dignity, honesty and good effort, it's not a failure. Competition is healthy when it's not vindictive or rigged or all in a good spirit. Teach your son that you're proud of him for trying something that must have involved practice and effort and courage on his part. Don't focus on the end result but the character and effort he showed in the process. Celebrate the boy that dared to try!
And please don't ask the teacher for an explanation. That would only be appropriate if she humiliated him in public or showed bigotry or did something really over-the-top and illegal or unprofessional. Don't rely on a teacher to instill good values in your child. It will be YOU who creates character and values in your child. Again, you will set yourself up for a lifetime of pain and frustration because you'll have to tell your son that you think he's a failure and you'll have to go to every soccer coach that doesn't put him in the game for enough time, every boss that gives him an unpleasant but necessary task, every teacher that doesn't give him an "A" and every girlfriend who breaks up with him. Teach him what real honest effort is and what the difference is between "failing" and "didn't do as well as I had hoped although I tried my best, and I'm proud of my efforts".