At least chemistry is objectively useful knowledge. Even if he would rather work in software engineering, there are a lot of places where domain expertise like that is very valuable. Plenty of software in the sciences.