That is because in many societies worldwide, families still don't want to send girls to schools because they don't think that it's a place where girls should go. Governments try to fight this with various incentives but often the cultural tradition is stronger than these incentives and this creates a society not based on equality. This is relatively common in underdeveloped countries.