So here is why:
You may have seen the R.java file in the gen folder.
Open this file.
It contains addresses and memory identifiers for all (R) sources.
When changing layout files, these memory addresses become outdated and point to the wrong view element. A clean / build will delete the R.java file and recreate it and become a necessary step after changing the views.
source share