The law must last several levels of approval and if it contradicts or conflicts with a federal law the law literally can not go in place do to the fact that federal laws are more for everyone than just for the people of a certain area
Girls usually have to help around the house and clean in developing countries, so they probably don't have a lot of time to go to school. Girls are also viewed as "not as capable" as men are.