'Price gouging' is not an accepted part of capitalism. Those laws (and customs..) that call out some prices as 'gouging' are bad economics and not 'proper capitalism' either way.
But you are right, that the drug prices are an even more egregious example. And, of course, we get those weird prices because of heavy and incompetent government interference in the drug markets. So we should probably look into scaling back that interference, instead of adding even more.
(And I specifically mention incompetent interference. To give a counter-example, for the most part I am quite happy with the economic policies of my local government. But then, I live in Singapore, where our Prime Minister was the top math graduate of his year in Cambridge, writes C++ sudoku solvers for fun and is looking forward to learning Haskell when he retires.)