Being rich, highly educated, low in criminality, low in illegal emigration means that other nations are more willing to welcome you in. Think of who you would welcome into your own home and they map pretty homomorphically to the same set of rules you would set at the national level i.e. probably someone who won't steal your things, is good company, won't break your rules, or overstay their welcome.