They both have a cost.
As an example, if tomorrow I invented a machine that made unlimited free copies of soybeans and distributed those copies for ~$0 to any internet connected location on earth, the market value of soybeans would very quickly approach zero.
Whether or not my machine is illegal would be quite immaterial to the laws of economics, which would continue to propagate information about supply and demand through prices so long as my machine was working.
Of course, the same is true of corn and also intangible goods like massages [0]. By induction you might claim that the story for mp3's is the same.
[0] If you find a machine that gives unlimited massages at a distance, let me know immediately
Who should take on that cost?