Like if there was a cure for cancer.
1. a cure for cancer isn't really a thing that can exist. cancer is not one specific disease it is a general category for a large number of diseases that all have the symptom of uncontrolled growth of cells. you could create a treatment for one but it would probably only work for that one.
2. do you know how expensive medical research is. pharmaceutical companies aren't charging large amounts of money to be greedy. if they don't charge that much they don't have enough money to do research and they will be unable to survive (and then no one gets medicine). no company in the world can afford to do medical research and not do anything with it if it works. any cancer treatment that works would be sold because it would be the only way to make back the massive amounts of money spent on it (and the 100 treatments they tested that didn't work or had dangerous side effects) before the patents run out and companies who didn't spend a single cent on research can make and sell it.