Timing is everything is a partial answer to the question "Why XML?", but. there are many reasons XML might not have worked as a technology or movement even a decade ago. Some of these reasons are technology based, whereas others deal more with the sociological ramifications of how technology is used and adopted.
The simplest reason XML is becoming popular now is that our machines have only recently become capable of the processing requirements for this data format. It simply would have been extremely difficult, if not impossible, to support the processing, data storage, and bandwidth requirements for the exchange of XML documents 20 years ago. Simply put, processing power, data storage, and bandwidth is becoming incredibly cheap these days. Processing XML now is not as big a challenge as it would have been in 1980.
Of course, the development of the Internet itself is a reason XML could not have existed in any widespread manner more than a decade ago. Although the Internet was developed in the late 1960s, widespread commercial use of the vast worldwide network was not possible until the early 1990s. Without the Internet, it would be costly, inefficient, and difficult to exchange data in a format such as XML. In fact, the Electronic Data Interchange (EDI) format thrived mainly because it provided both a means for representing data as well as a method for transporting it from place to place. With the widespread use of the Internet, however, technologies such XML could be used in a more extensive manner than formats requiring the use of a closed, proprietary network.
Furthermore, we now have experience with many technologies that have worked to varying degrees of success. Our experience with EDI has given us an understanding of what it takes to perform electronic transactions. Usage of the Standard Generalized Markup Language (SGML) and the widely popular Hypertext Markup Language (HTML) has given us experience in what it takes to create, manage, and maintain structured data stores. The development and use of various object-oriented and distributed application technologies, such as Microsoft's Component Object Model (COM) and the Common Object Request Broker Architecture (CORBA), has given us the required know-how of when and how to apply distributed processing techniques and methodologies. XML has given us another means for expressing this experience. Without that experience, there is no doubt that XML would simply be another step in the path towards a more perfect data-representation technology.
Although XML might not be that final step, it certainly is a product of all the experiences, mistakes, and wisdom learned from our previous attempts to exchange information in an open manner.