Because the US Government, starting several Administrations ago, has made the cynical calculation that a few dead Americans are a low price to pay for relieving the social and economic pressure on the Mexican government, and thereby a Communist revolution there. Enforcing the black letter law of the land would greatly increase the risk of Mexico's government falling. It's not really about placating a few reconquista-talking college professors in LA, nor about the availability of cheap labor, nor about illegals contributing to Social Security, though some politicians might also be gaining short-term benefits from all of those things.
In short - there is no help coming from Washington, whether a Democrat or Republican is President. The Federal Government has sold us out, in the interest of achieving geopolitical stability on the cheap.
So you are right - if you take up arms against illegals, you are taking up arms against an unpublicized, unauthorized Federal welfare program...and they will crush you for it. Look at the reaction of both parties to Arizona's new law - the state's politicians are daring to interfere with The Plan, so they are getting the full Race Card treatment.