What reason besides greed does an American company have to fire a US worker and hire a foreign worker at lower wages and benefits
Because they want to be more successful as a company and provide benefit to their shareholders, which is the goal of any corporation. Why does the domestic worker deserve to be more highly paid if he can't provide any additional value?
who is more important to our society? a working taxpaying American or a working non taxpaying foreigner
Foreign nationals pay U.S. income tax, but don't qualify for SS or Medicare. They also pay local property tax, local sales tax, etc. Whatever tax they pay is essentially "cake" to the IRS.
I don't know 1 product besides pencils and crayons that are 100% are in the USA. That's ok by you?
You're exaggerating. But, yes, I'm generally okay with most goods being imported if they can be produced less expensively abroad. I am generally not okay with huge swaths of the U.S. workforce being more or less unemployable. If we need to artificially subsidize low-wage labor in order to create demand at the bottom then so be it. Better that than have people not working and on the dole.
Our people are fat because the only places to work anymore are Wal-Mart's and burger kings and call centers of the USA.
Our people are fat because we eat a lot of junk food and don't exercise. Learn a marketable skill and you don't have to work at Wal-Mart, Burger King or a call center.
American companies should be required by law to hire Americans first and foremost
Let's take this to its logical conclusion. Should "American" companies be required to purchase only American goods? Can't buy Lenovo; gotta buy Dell. Can't buy Toyota delivery vehicles; gotta buy GM. Etc. Should we allow foreign investors to buy stock in "American" companies? A corporation is "owned" by its shareholders, after all, and we want these to be truly "American" companies.
What other market restrictions would you impose?
Build a border that can be enforced
Not economically feasible given the size of the U.S. border. Not to mention, many undocumented folks crossed the border legally. More guards, fences and guns wouldn't have stopped them. If you want to stop undocumented immigrants from working you need to work on the "demand" side. For instance:
1. Raise fines on employers.
2. Devote more resources to policing employers.
3. Makes it as easy as humanly possible for employers to verify work eligibility.
4. Require schools to verify citizenship or legal residence before registering new students.
5. Create frameworks similar to the EITC that benefit low-wage domestic workers but that ineligible workers aren't able to access. For instance, wage subsidies available only to citizens.
Preventing illegal immigration by "securing the border" is a red herring.
I've noticed several design suggestions in your code.