I'm too young to know what happened or why. By the time I got my first engineering job, JSON was the standard choice for "stuff you need to serialize."
I feel like YAML has also become the default choice in several areas where XML would be flat-out better.
The benefits mentioned above are due to schemas, and not the serialization format or tool scope, all of which could be improved independently.
But even if an excellent combo dropped from the sky getting everyone to use it would be very hard due to inertia.
That said, some folks with demanding needs use protocol buffers or thrift, etc. And have for a while.
I'm not advocating for universal XML use, nor am I advocating for universal JSON use. I'm advocating for standing back and asking yourself "what am I trying to accomplish?" then choosing the right tool for the job.
As for protobuf: I've seen entire companies built on it. It's amazing what your engineers can do when they don't spend half their time twiddling bits or arguing about data formats. It's a godsend for embedded developers (like me), because JSON, XML, et al are non-starters in that space.
Others won’t even try to edit xml/json and constitute the great majority of humans.
json is better but the lack of trailing commas dooms it as a more general format.
XSLT is powerful but harder to get right than just reshaping JSON.