Well, depends on how a "uniform" is defined. For example, a school can define it such that boys have to wear plain blue long or short sleeved shirts, no tank tops or tee shirts. And plain blue or brown pants, worn waist above the hips and bottoms not touching the floor. Clothing may not have holes, any holes must be sewn up. No patches or iron-ons permitted. Similar concepts for girls.
Some schools have done this. Parents have to buy their kids clothes anyway, so this just specifies what is appropriate for school. So no, the government does not buy it.
The concept is it prevents gang colors, rude messages, and prevents wearing clothing provacatively. Plus - it makes it harder for the kids to separate into cliques based on the clothes they wear. Usually it is a good idea overall, when it is applied reasonably.