When I came to Tanzania 25 years ago, primary education was mandatory for all school-age children. The schools, though tuition-free, were not well attended in the central part of the country where I was stationed.
Government officials would visit the schools to check their enrollment rosters. They would levy fines against the parents of children who were listed on the roster but not attending the school. To counter this, the parents would bribe the headmasters to have their children's names stricken from the roster. That way the children could be kept at home to tend the cattle and work in the fields.