Why are companies/corporations allowed to patent things they did not create?

Prime example: Monsanto. I think this is one of the most counter-productive things done in modern times.