Perfectly legal. Unless they were legally charged and ordered by a court to preserve data considered to be used in a crime, they can’t be charged with shit. Cops don’t dictate this, courts do, AND that scope only applies to an active prosecution anyway.
I'm not a lawyer, so I'm not arguing that you're wrong here, but the article describes the federal law the journalist was charged with. It seems very broad, and it's a bullshit law, but from what's here, it seems more grey area than perfectly legal. All of 2232 seems to require knowledge (which it seems like he had, but might be arguable) and action. You could argue that the journalist didn't take any affirmative action to wipe the phone. The action that wiped it was the feds entering a code.