There's some mystery in this, according to Warren Buffett. He knows that breakfast cereals aren't commodities - they can charge a premium, and stay in business profitably for decade after decade. But most of the other goods in the same supermarket are much closer to commodities. He isn't sure why. (Maybe it's cause we find it difficult to make decisions in the morning and so become captive to habits then, but not at suppertime?)
(Yes, IP is a way to escape the commodity trap, too: but not suitable in most cases. File IP under "nice work if you can get it," because almost always it's rather easy for others to work their way around your IP. Even with patents - it's an intentional feature of the patent system that others be allowed to find and use their own methods to accomplish what you just showed can be done.)