These are not civil lawsuits filed by anyone.  They are defending criminal CHARGES filed by the government.  If there is no valid defense under the law, then the government should prevail.  But this can get expensive, and I don't think any governmental entity should be fronting the money for that.  Even though deportation doesn't solve the problem.  Most deportees are right back by the end of the day.  If you take my dog or my cat across the street, they come right back.