Flynn was working as a lobbyist for a foreign government while working as an adviser to the Trump campaign on national security matters, not as the National Security Adviser in the Trump administration.
I'm not suggesting Flynn's work for Turkey was illegal (let's assume he was properly registered as a foreign lobbyist for the sake of this discussion). I'm suggesting the political optics were awful for Trump.
Only to the media, and liberal politicians who wanted to make hay over it. Flynn's work had nothing to do with the campaign, or with Trump, but because neither group would ever point that out in statements, or news articles, they'll simply twist the facts to achieve the greatest effect.