Not all schools require uniforms. In fact, the vast majority of publicly funded schools DON'T. Instead, they have dress codes which are often very capriciously designed and almost impossible to totally enforce.
In the United States, the two main types of schools that have uniform requirements are parochial schools (which are run by the Catholic Church) and private schools, which are run by everyone from religious organizations to large private corporations such as Google and Apple, for example. The reason THESE schools have uniforms when the others don't has a lot to do with their perception of education. The Catholic Church views education as being similar to a job, and as such, schools that it runs expect the students to dress appropriately for classes and school functions. A similar viewpoint is held by most of the groups that run private schools. Uniform requirements aren't bad things. They help eliminate competition over dress and looks, which also helps to prevent bullying. And they encourage kids to focus on SCHOOL, and not on outside distractions. ALL of the parishes that have schools have special funding available to help families pay for things like tuition and uniforms for their kids. It's common practice at most of them to have second and sometimes, even third collections at weekend Masses to ask the congregations to give money to support Catholic education. They don't do this every weekend- just a few times a year.
The cost of uniforms and books varies widely from school to school, depending on who runs it. But help is available in most cases for students who have financial needs.