Because according to the regulations of the Ministry of Education, children without registered permanent residence can go to school, and receiving compulsory education is the right and obligation of every citizen. As long as the child is over 6 years old and was born before September of 1 year, he can enter the school nearby.
It is not necessarily related to whether the child has a hukou, and the child's hukou is not a hard requirement for the child not to enter school.