This is an idealized notion (but one I wish everyone could adhere to). In reality, intellectual property rights were considered a necessity for societal progress. Before intellectual property rights, many ideas were lost because they were guarded too tightly. If that person died, those secrets were potentially lost forever and, presumably, society would be worse for it. So we developed IP rights as a way to share ideas in exchange for exclusive rights to them for some time. (This isn't discounting how these laws can be perverted to hurt the original intent).
Likewise, trade secrets are a mechanism to help foster better (and fairer) commercial practices under the guise that society will benefit. It's a pragmatic take rather than an idealistic one.