I'm not an educator, but most of my family is and no child left behind is an interest of my sister who is a teacher, and it goes like this:
School funding is heavily driven by tax revenue of the surrounding areas, so more affluent districts could afford higher pay, more expensive materials, etc than a less wealthy district. This meant the quality of education varied wildly across state to state, city to city, district to district. The subjects taught and the full scope of each subject being taught was different as well. So you'd end up with entire groups of children not having been taught things needed to be a productive member of society
No Child Left Behind sought to correct this.
The idea was to create a standardized set of knowledge expectations across the US and used additional funding as a corrective function to underperforming schools. If a school was doing well by their students they got more money, if a school was not providing as good of an education, they'd lose money. Doing "well" was primarily measured by checking the students' knowledge of the listed standard topics.
In practice what happened was standardized test scores got mathematically tied school funding. Average grades, number of students graduated, a few other metrics also got tied mathematically to funding.
School districts could try their best, provide the best quality education possible, and then hope and pray that the students performed well... Or they could cook the books and change internal standards to ensure that by all the measured metrics they got the most funding they could