1) He owned the business and, even if distasteful, it was not illegal to have such a contest.
2) The contest did not require anyone turn anyone else in for conduct that would cause them to be fired; the owner hired a secret shopper to evaluate employee performance. If anything, (and, IMO, I think this was the purpose of the contest) it gave them fair warning their adherence to rules was being observed and that a failure to abide by them would result in termination.
3) The employees voluntarily resigned which, regardless of the tastefulness of the contest, disqualifies them from unemployment benefit.
4) Nothing in the story indicates the "offended" employees attempted to address their grievances through any channels that may have been afforded them by their employer -- conveniently, there's no mention of whether or not such a process existed.
5) Quitting, and giving up a source of income in this economy, is seriously stupid. Don't play the game. Quit talking on your cell phone, wear the ing shirt, don't let your friends behind the counter, take off the hat, park where you're told, and be courteous to customers. Sounds like the owner was having a problem with widespread disregard of the rules and wanted to bring back some decorum.
I think the judge got it wrong.
In the future, I bet the employer just hires the secret shopper and fires employees without such an "offensive" warning.
If I were the employer, I'd be tempted to sue the former employees for slander or defamation.