Sadly for Afghanis, I doubt they could actually use their passport to travel to the countries that freely admit them. Many of those countries are very remote and impossible to travel to without stopping in another country first.
Lots of countries offer visa free transit though, right? You usually don't need to even go through customs when getting a connection international flight.
Even where you usually stay in transit area, the country may demand transit visa for certain passports (such as those on top of this quiz), which means the airline wouldn't allow you on the flight for starters.
I've only ever had to go through customs and therefore use my passport in transit when I was changing airports or I had an overnight layover somewhere.
You can follow the link at the top of the quiz, then select "Compare", and you can find out which countries work for North Koreans. (For example, Tuvalu!)
Armenia, Bangladesh, Belarus, Bolivia, Cambodia, Cape Verde, Comoros, Ivory Coast, Cuba, Djibouti, Dominica, Ethiopia, Gabon, Guinea, Guinea-Bissau, Guyana, Haiti, Iran, Jordan, Kyrgyzstan, Laos, Lesotho, Macao, Madagascar, Malawi, Mauritania, Micronesia, Mozambique, Myanmar, Nepal, Nicaragua, Nigeria, Palau, Palestine, Qatar, Rwanda, Samoa, Senegal, Seychelles, Sri Lanka, St. Vincent, Suriname, Tanzania, East Timor, Togo, Tuvalu, Uganda according to the source, but I know a lot of people will go to China visa free and South Korea of course does not require a visa.
Well, to be honest some of the people from the countries on the list don't bother using passports and just walk across national borders on their way to Germany, UK and Sweden.
True. However, covid has halted things and the EU has already been putting the brakes on migration both at home and abroad. Italy has been using their navy to prevent Africans from reaching the mainland and Greece has been stopping Syrians from crossing in through Turkey. Meanwhile Germany has even sent their military into Sub Saharan Africa to work with various leaders including some dictators who are known human rights violators by paying them and giving them newer technology to keep migrants out of Europe. Money talks.