Shkreli messed up by continually taunting US law enforcement. He probably wouldn't have had the book thrown at him if he wasn't constantly talking about how great it was to be an evil capitalist, and instead gave the mealy-mouthed platitudes that every other CEO of pharma companies does.
Yep, he's the poster boy for "play stupid games, win stupid prizes."