1. Companies were cornering certain drugs, then hiking their prices up significantly. Shkrelli did the same thing (but stated he was willing to give it free for anyone who asked). Note, that this is not illegal in any way, but news was all over it and citizens were pissed.
2. Shkrelli, being outspoken, became the focus of this issue. He dug a hole for himself, but concerning drug prices, he did nothing illegal.
3. Prosecutors, needing to do something got him on fraud charges where he misstated information on an investment but still tripled their money.
4. Shkrelli goes to jail, news and citizenry quelled. Companies still free to continue cornering the market and jacking up prices with impunity.
That's how you get away with this stuff. News made money with the story. Companies made money with their drug hikes, politicians and prosecutors look good because they took action, Shkrelli investors made money. Shkrelli lost, patients lost, taxpayers lost. Rinse, repeat. Systemic corruption.