This is the moral theory behind patent laws, and I’ve never seen definitive evidence that it actually helps, and a lot of examples where IP law completely hampers innovation or at least adds layers of bureaucracy.
I’m glad we don’t have to deal with this issue as much in software. I can’t imagine that a world where all the companies actually tried to enforce their software patents would be better for anyone but the lawyers.