I've heard it many times times, that "school uniform is for students to have something to rebel against". So how is that not deliberately antagonizing kids as well as wasting teachers' time and energy?
I think because this is an oversimplification of the argument.
Nobody needs to create reasons for teenagers to rebel. If you want them to rebel you can just leave them to it and somebody will find something. In fact, ideally, in terms of teachers' lives being easier, you would have no rebellion at all, so trying to entice them to rebel makes no logical sense.
So the point of uniform being a place for teenagers to rebel is in theory a sort of distraction or containment of teenage rebellion. The assumption (may be correct, may be bollocks) is that teenagers want/need to rebel/will rebel regardless of what you do, and to some extent that their rebellion is meaningless and random.
So if you give them uniform to rebel against, then in theory they are hitting that "need to rebel" and will be satisfied or tired out from doing that and are less likely to call the teacher a prick, fight each other, refuse to do their work, watch youtube on their phones in class or any number of things which will actually cause a problem because they disrupt other students or threaten the order of the school environment. Wearing the wrong uniform is a very harmless rebellion and if it satisfies an "urge" to rebel, then in theory, great, because even though some teacher time is taken up by policing ties and so on, it doesn't really harm anybody and is less time than would be taken up by teachers trying to deal with bigger problems.
Kind of like the toddler parenting technique where you try to stop them saying "no" to everything all the time by offering them choices, but the choices are something that you control. (e.g. red t-shirt or blue t-shirt, carrots or peas). Toddler gains the illusion of autonomy but adult ultimately retains control.
Or the other justification for this is the idea that if you give them something that they can easily rebel about, it allows you to readily demonstrate that there are consequences to rebellion, which may help deter rebellion in general (there is a bit of a "Broken Window" feeling to this).
I don't know if either of the arguments have merit or not, but that is what people mean when they say that uniform is to give pupils something to rebel against.