The chemical differentiation of the cometary nucleus: the process and its consequences