you are correct in that they are taking away resources when they stay here illegally. Also they get paid under the table because they don't have a valid SSN, and usually for less than minimum wage because they cannot complain to the government about it without being taken back to their country of origin.
Wal-Mart claimed they contracted out the work and didn't know about the illegals working for them. But the government claims they tapped the phones of Wal-Mart Execs and have them on tape talking to the contractors about it.