Often because of a successful state conviction. Parallel federal charges are often filed as a backup, as you can be prosecuted, found guilty and punished twice under the two jurisdictions. [1]
[1] https://www.law.cornell.edu/wex/separate_sovereigns_doctrine
But also the fact that a conviction wasn't won doesn't mean the prosecutors were wrong. Could be that the defendant was just good at covering up the crime. The criminal system, by design, gives a significant advantage to the defendant; the burden of proof to a high level is on the prosecution.
Federal trials are usually much more complex than state trials, as large crimes tend to spill over state lines, affect taxes and banks, etc. so there's a greater attack surface to poke holes in.