That's survivorship bias. Yes, the successful pharma companies are quite profitable, but there are 10 failed companies for every successful one.
I remember reading a paper that said the overall returns for the industry are either single digit or negative.