Schools tend to have groups of students or cliques. These groups tend to hang out and communicate almost exclusively with those in their group. To extinguish themselves, they usually wear similar clothing. This not only acts to include others of same interest but excludes others. If students had uniforms, then there wouldn't be a visual barrier to say who you can and can't talk to. To find out if someone had similar interest, you would actually have to speak with them. This would cause social interaction among all groups. Kids that would normally never be seen speaking with each other might now find some common interests.
Sure, you'll never have to worry about dress code, but schooling extends all the way until the individual is eighteen in most circumstances. Asking an eighteen year old, much less a sixteen year old, to wear the same thing day in and day out in Western culture is a sisyphean ordeal. They're gonna hate it nigh universally. Everybody wants their band tees. In a world where the only truly differentiating factor that the adults they interact care with care about is their ID and grade, it's important to allow the social space needed for a human to stay mentally healthy. Uniforms don't destroy that entirely, but they do restrict it.
It's also inconvenient. I never got caught up on what to wear in gradeschool, anecdotally, but I did quite often find myself out of available clothes. I had AWFUL laundry habits and even the uniforms that were required, physical education, didn't get the treatment they deserved (gross). It's hard to say if being forced to wear the same of, say, two rotating uniforms would have forced me into a new habit of being better with laundry, but it certainly would have been more expensive at the laundromat if it had.