People hand out comms to whoever they "see" as doing the best, not who is "actually" doing the best or putting in the most effort. It basically works like this in the minds of players....

If Tanking:

1) Is this a full party with another tank? If so, and they didn't take my role, they get the commendation.
2) Did the other tank leave early or there wasn't another tank? If the healer didn't force me to use all my cooldowns constantly to stay alive, they get the commendation.
3) Did the healer suck? I might give them the comm anyhow, or I won't vote at all. DPS only get it if I screwed up horribly and we only won because of them, or if I play that particular DPS class in here often and they did at least as good as me.

If Healing:

1) Did the tank keep the hate off me, and use their cooldowns to make my healing job easier? If so, they get the comm.
2) Was there another healer, and if so did they make it so I didn't have to do much of anything? If they didn't suck, they get the comm.
3) I can give the comm to a DPS? Why would I? Fine, since the tank left already and there aren't any other healers, I guess I'll give it to the DPS I had to heal the least. Though I guess I could just not vote.

If DPSing:

1) Was the other DPS good, or playing one of my favorite classes and not sucking? They get the comm then.
2) Did either the Healer or tank particularly stick out as being good, or keep me from dying when I screwed up? That one gets the comm.
3) No one was particularly good? I'll probably throw it at the DPS then since they don't get many comms. If they sucked though, I'll just give it to whoever. The only way I won't vote is if the group was particularly bad.