Or move back to your home country once you've gained a beneficial citizenship and can have foreign government benefits paid out every month while you don't even live in that country anymore.

What country pays out benefits to non-residents?

And if you pay taxes and social security for 20+ years why wouldn’t you be entitled to it? Especially considering you wouldn’t be using expensive programs like Medicare.

You don't have to pay taxes nor social security for 20+ years in order to become a citizen in very many countries. You can live on benefits before becoming a citizen and after becoming a citizen. Usually the requirement is that you are a resident for a set number of years in order to become a citizen.

> You can live on benefits before becoming a citizen and after becoming a citizen

What benefits? I don't know every country in the world, in Germany unless you count retirement as a benefit (which is something you pay for and have to reach a certain age that is ever moving upwards) you don't get any assistance if you're not living in the country.

Perhaps. I think it's more about the passport ranking so one can travel and also the salary bump. But even if more of the other government services, try living in a country where if you get into a serious car accident you have to pay cash at the ER before they treat you. Scrambling to find multiple thousands of dollars in cash at 3am sometimes. (This happened to my friend in Kenya)

Im not sure if I can blame people for wanting to have more financial or medical security.

Is it legal to let people suffer or even die at the ER on Kenya if they don’t happen to carry a few k$?

I think a very low percentage of migrants do it so that they can get a better passport for traveling. Sure, there are people who do that also.