I think that's missing the point again. The point of a patent is so that the underlying technology is public. A patent system in fact does exactly what you suggest, which is to create a monopoly for a certain period of time so that the inventor can profit. But the existence of a patent implies that the formula for the cancer drug is out, and so other companies can use that to potentially create better versions or apply it to other areas.