As technology has progressed, it has meant that instead of very few producers and millions of consumers of 'content', now everyone produces content. That means the value of 'content' has drastically reduced to the point that it's almost worthless for some areas.
This is progress, and you can't stop it.
Of course art is valuable, as it has always been. But as stated elsewhere, there are a billion pictures of a sunset online... supply far outstrips demand.
And yes, as a programmer, you can either work to keep your source code secret, or you can provide software as a service, charge for support, or any number of other monetization options. But you can't really sell open source software without some reason for people to buy it.