Who thinks that it's wrong to not hire someone because of the length of their hair? I think it's wrong becuase not only is that discrimination, stereotyping, but classifying me as a certain 'type' of individual that is not worthy of any position of that type of job, nor any type of job in general. Even if I had a good attitude and everything else they still wouldn't let me have the job. Is that wrong in your opinion?
Ah well.... yes I suppose it probably isn't fair. I wouldn't say it was necessarily wrong, but it isn't fair - like most of the real world.
What you have to realise is that even if your manager is the greatest guy in the world and cool with anything, the average person is a git. If you have to sell things to people then they will probably refuse to buy something from someone they see as a long haired tree-hugging hippy. So it would therefore be useless for your manager to hire you for the job, as you wouldn't sell anything!
Of course, this depends on the job, if you never have to interact with clients then it shouldn't matter at all.
I don´t know if hair length could accounted as a basis for a discrimination: usually the interviewer is looking for a suitable person for a given a job. His/her job is to evaluate the totality of interviewees personality in a limited time. Certain qualities in your appeareance just get you eliminated earlier on.
I work in a quite conservative setting, but because my field of expertise is slightly artistically bent, I could get away with longer hair. For no good reason , long hair has been associated with asocial behaviour or being eccentric. If a company does not wish to stand out from the crowd, they might take the "conservative" high road. If they live on the edge, they might see your longer hair as an asset...
So, if you don´t want to compromise on your looks, you might want to reconsider the type of employment or type of employer you are looking for.