At these ages, it is usual for children to be taken to school by parents, grandparents or caregivers. At the beginning of the year, when enrolling in kindergarten/school, the parents declare who can pick up the children at school. The school is thus forced to control the children's exits.
This is more relevant in the case of divorced parents.