When XAML was developed, XML was still very much in vogue as a general purpose format for storing and exchanging structured data (probably because of the influence of HTML, and the growing popularity of the web in the years preceding).
XAML is not different from XML - XAML is an application of XML to shell design and configuration.
The supposed benefits of XML is that parsers are widely available, there is a transformation language available in the form of XSLT, and it's possible to intermingle data from multiple applications into one XML document.
I suspect XAML was actually developed mainly for the internal needs of Microsoft as one of the largest software developers and vendors on the globe, and pawned off to the market only as a secondary consideration.
One of the thing to note about Microsoft is that it has whole teams (or whole departments) who design the UI separate from those who design and implement the detailed underlying program logic, and it has considerable localisation, accessibility, and automatic testing needs too. I assume Microsoft has a large amount of in-house tooling (and expertise) specifically dedicated to handling XAML.
The prior existing alternatives to XAML were often bound to a particular language or development environment (such as Winforms), or were ancient (such as the "resources" approach, which I think is as old as Windows itself).
A great many of Microsoft's developer community however do not have the complicated needs to which XAML is potentially most suited, nor the division of labour. I imagine the majority of developers who use Microsoft tooling, are so-called full-stack developers who handle an entire application end-to-end.
Also, fervour regarding the general usefulness of XML has abated in the years since (nowadays, JSON seems to be king as the go-to structured data storage format).
I imagine XAML continues to fulfil its function at Microsoft, but if it didn't already exist, I doubt it would emerge into the market in the same form today.