Of course schools provide childcare. The government recognises they are part of the network of childcare that allows parents to work. So do teaching unions.
This was made exceptionally clear during COVID - schools remained open to perform their childcare function to some children, while their education function was offered to all online.
Teachers didn't provide that childcare, but I did, and so did thousands of other school workers alongside me.
Similarly, when schools are shut due to teacher strikes, I'll still be there providing childcare for some particular students, even while the school isn't offering education.
Every afternoon, we have a small cohort that we are not actually able to provide a meaningful education for, but have in school and keep clean, fed, safe and supervised while providing free play activities. No learning happens or is planned, as this particular cohort are not able to learn in mainstream and have extremely complex needs. I am certain of this because I am on the rota. Their teacher's don't offer childcare; some of these students have never been inside their nominal classrooms. The school does still essentially provide childcare though, just not the teachers.
Teachers don't necessarily provide childcare, but schools do.