It's more correct to say that it is selectively prosecuted. Mike Flynn had his career ruined by a perjury trap that saw him lie about things much less important than a federal agency spying on US citizens.
Lying about foreign contacts is a big deal. It is very much an important thing and you are required to list them when applying for a security clearance. He didn't just mistakenly forget about them.