On understanding the chemical origin of band gaps