According to that argument, we should never enforce any law that costs more than it saves. If somebody breaks into my house and steals $400, then it's clearly more cost-effective for government to reimburse me $400 than to track down, prosecute, and incarcerate the thief.
Illegal immigration is not against the 10 Commandments.