Floro has been across the board a better pitcher than Lopez this year.
The Twins essentially gave up Lopez's last year of ARB on a swap with Florio who is a pending FA. 30 year old for a 32 year old.
Lopez: 5.09 ERA/5.94 FIP/2.8 BB/9 6.9 K/9 .265 BABIP
Floro: 4.54 ERA/2.78 FIP/2.5 BB/9 9.3 K/9 .397 BABIP
Combined with the mental health issues he has had, I can't see how this as awful as most of the comments are making it out to be so far. This makes the trade last year seem worse, but that should have no bearing on this deal.
Makes sense for the Marlins, they get back someone they can hope to "fix" for another season for a guy who wasn't going to be back next season.