Never said it wasn't.
But the first question you have to ask when criminal charges are brought is: can the defendant be convicted.
Because if an indictment alleges an offense on which someone can legitimately be convicted, most other shit goes out the window.
Now, given the incompetence of the Trump administration, a deep dive into documents and statements might actually prove a political motive and selective prosecution, but those aren't notoriously successful motions to dismiss because intention is usually very difficult to prove and very easy to pretextualize.
Also note that this wasn't, apparently, because Judge Dugan had ruled against the government in immigration cases. She's a Wisconsin county-level judge who wouldn't rule on most anything approaching an immigration case.
It was because of specific actions she took with respect to a specific party before her court. Nonetheless, it appears that the charges will not stick.