Perhaps the biggest reason is to assist in the creation of tools for view definition,
such as the aforementioned graphical layout editors in Android Studio and Eclipse.
Such GUI builders could, in principle, generate Java code instead of XML. The
challenge is re-reading the definition in to support edits — that is far simpler if the
data is in a structured format like XML than in a programming language