They don't have the resources to prosecute more than a minority of violations, and their choices many times are based on politics.
Even at the federal level, we see the Justice department "deprioritizing" enforcement of drug laws in states that have legalized marijuana. I agree with the outcome in that particular case, but it's definitely pushing the limits of the intended separation of powers.
The biggest exceptions are finance and tax law right? Seems bizarre that they are though.
But so much of the complexity is from politicians abusing the tax code to support their pet social projects, to benefit some company in their constituency, to protect some industry from competition, etc. Then they have to make it even more complex and technical to undo the unintended negative effects of their original abuses. Everyone involved should really be ashamed.
It's not a political ploy. If you try to make an end-run around the law, they're going to go after you to defend the rule of law. The law isn't a computer program that you can find a bug in and circumvent (well, most of the time). The law is purposefully broad and fuzzy, and is interpreted by human judges who will see through your little scheme.
It's not the prosecutor's or the judge's role to pass political judgement on the law. Their job is to uphold the laws that the people's representatives have passed.