At what point in history would you say patent laws became beneficial to society? Patent law was created as a way for oligarchs to maintain economic power over their subjects[1], and it is still used as such[2].
Beneficial to society? Drug companies have patents, and patents expire. Upon expiration, generics become available because the synthesis of the drugs is public knowledge, which creates a competitive market and lowers the price.
Without patents, the drug companies could (modulo other regulations) keep synthesis of their chemicals a trade secret, which may not be replicable in a reasonable time-frame.