Agreed, they're not convenient for arbitrary attributes. I think where they shine are using a well defined preset of attributes to define structure.
Regarding the legacy thing, I think it's both. If you look at a lot of new tooling coming out that has to store UI state, people are still using XML