That sounds fair only if you imagine that getting education is something like buying a product: if you like it, you take it and agree to pay the cost; and if you don't like, you don't take it.
But sometimes the education is mandatory, inefficient, and it sucks. Then the people who want to leave the country would be required to pay a lot of money for something they didn't want and that wasn't worth it.
Basically, any country that wants to prevent their people from leaving could just assign an absurdly high cost to its mandatory education, and say: "hey, anyone is free to leave, they just need to pay us more than they will ever make".
But sometimes the education is mandatory, inefficient, and it sucks. Then the people who want to leave the country would be required to pay a lot of money for something they didn't want and that wasn't worth it.
Basically, any country that wants to prevent their people from leaving could just assign an absurdly high cost to its mandatory education, and say: "hey, anyone is free to leave, they just need to pay us more than they will ever make".