Uniforms actually have a key safety feature to them. They fulfill the requirement for active crew members to be easily identifiable for the passengers. That's why some companies have a procedure which does not allow deadheading crew members to wear full uniform, i.e. you need to take off your epaulettes and tie if you're not serving as active crew but only taking a ride as a passenger before or after duty. That's probably also why pilot uniforms look more or less the same throughout the world.