That applies to Americans working in Mexico and to legal, repeat, legal Mexicans working in the U.S.
They get SS deducted from their paychecks and when they move back to Mexico they now get full credit as if they had been making contributions into the Mexican SS system.
Ditto for Americans working in Mexico who get full SS credit when they move back to the U.S.
But I have to admit, it gets the adrenaline pumping more when you spin it like you did. That's much more fun and plays with peoples' emotions better (at least, for those who don't know the whole story).
Mexicans will get credit for working in Mexico and can add their years of experience to social security. They didn't pay into our social security in Mexico. Why do you think it will cost American taxpayers if they paid into it?