You can't equate the two -- different cultures entirely.
But the reasons for the dress code are the same.