One philosophical justification for copyright is that it encourages creators to produce and eventually share creative works. But the law doesn't ask whether a work provides public value before granting copyright.
You are undermining the argument by including your faulty understanding of law and missing the bigger point. I am not saying copyright and trade secrets are treated the same in terms of protection by law, I am saying they should be. Because as a writer, I do not want to give my life's work away and let people do whatever they want with it. I want it to stay in my family and I should have the legal right to do it. If that means registering a company and using other laws to protect my work, so be it, but it is not meant to be given away for "public good" in my opinion just because its a work of art.
The reason is to encourage people to create useful writings and make useful discoveries. But we need to balance this encouragement with the benefit we get by making these writings and discoveries available to everyone. By granting a time-bound monopoly the state rewards creators, and by ensuring this time period is not excessive, spreads the benefit among the populace.
Plus, with a time bound benefit, you have to keep on creating, which is good for everyone under this regime.
These aren't, like, inherent rights, they are contingent