I think it is the perception of opportunity more so. Whilst there are some benefits mostly they are, like everything these days, well over stated.
Undocumented immigrants are barred from most federally funded programs, including:
Medicaid and Medicare: Except for emergency services.
Supplemental Nutrition Assistance Program (SNAP): Commonly known as food stamps.
Temporary Assistance for Needy Families (TANF) and Supplemental Security Income (SSI): Cash assistance programs.
Social Security and Unemployment Benefits: Inaccessible without legal status.
A valid Social Security number is typically required to access these programs, which undocumented immigrants do not possess.
(
Explainer: Immigrants and the Use of Public Benefits in the United States)
Now that said there is some state based programs in cali, NY and a couple of others but it is not wide spread.
What is interesting is in 2022, they paid approximately $96.7 billion in federal, state, and local taxes.
(
How US immigrants working illegally help fund programs they can't access, like Social Security and Medicare)