Frankly, any discussion about this invariably becomes a critique of capitalism. If you further generalize “software” to “organization”, your examples would include the various decisions companies make to increase profit: polluting, exploiting their workers, etc. At some point, we just have to acknowledge that a free market simply does not work.