The industry could converge on standards which allow certain classes of "repeated but different" code (drivers?) to collapse. By collapse, I mean they could share a generic version of code, thus reducing the overall line count.
Or a new implementation (or OS) could come along, with compelling advances and no baggage. The old code doesn't so much collapse as become obsolete.