Since I was a teenager, I have always worked in jobs that had mostly male employees. The best advice I got was from a woman who I worked for when I was very young, she told me if I wanted to succeed in the working world, I had to learn to think like a man.
That meant, don't talk too much while you are supposed to be working, don't gossip, conduct yourself in a professional manner, dress appropriatly for the job, have respect for other people etc. I learned a lot from this woman, and I also learned a lot by observing how the men worked
Is that fact that you were more attractive than the other women really relevant, does the fact that you are more attractive help you do your job better. The men don't care about these things, men don't worry if they are as attractive as another guy. The men probably weren't even thinking about who was more attractive.
There is a time to be "sexy" and a time to be professional. Maybe that woman didn't want to see you embarass yourself, You say you were wearing shorts that were really short, maybe you should think to yourself, "Are these shorts really apropriate to wear for what I am doing?"