I always had to wear a uniform and so did my daughter. I don't believe in the main it is viewed as a means of enforcing discipline but rather, as has been said, a sense of belonging and community, eliminated any oneupmanship in clothes and to a certain degree respect for one's school and how one behaves when wearing it in public. As we got older it was also a good way to test the waters of defiance - shortening our skirts and forgetting our berets for example.