Why do halogens have odd numbers as oxidation number? Halogens like $\ce{Cl}$ always exhibit $+7,+5,+3,+1,-1$ as their oxidation numbers. I found the following answer after checking several sources:


  Halogen atoms have $7$ electrons in their valence shell, so $1$ of those electrons is spin unpaired, which is an unstable situation. If an even number oxidation occurs, said even number of electrons are taken away, leaving still an odd number of electrons with at least $1$ unpaired. Taking away an odd number of electrons leaves an even number of electrons with the opportunity of them to be all paired.


These oxidation numbers are observed in compounds like $\ce{HClO4}$ and $\ce{HClO3}$. We know that, before forming these compounds, the valence electrons of $\ce{Cl}$ are excited into the d orbitals. Thus now, they are not in ground state, but in the excited state instead. 

The quoted explanation is giving the reason for my question on the basis of the ground state of halogens. (I especially consider $\ce{Cl}$). But we know that, before formation of compounds, the halogen atoms are in their excited state instead. 

So is the quoted explanation correctly justifying why $\ce{Cl}$ exhibits odd oxidation states only?
Because of the way we construct oxidation numbers.  Put an atom into a molecule with all electrons paired and all the bonds heteronuclear, and by assigning all the valence electrons to the more electronegative atom of each bond we render even number on each atom.  Combine that with an odd number required for a neutral atom and you count an odd difference, thus an odd oxidation number.

Note that I have assumed all electrons to be paired and all bonds as heteronuclear.  But, it is not always the case.  There could be homonuclear bonds as in the halogen element itself ($\ce{X_2}$), with an oxidation number = $0$.  Or there could be unpaired electrons on the halogen so we count an odd rather than even number of valence electrons per halogen atom.  $\ce{ClO}$ (chlorine oxidation number $+2$) and $\ce{ClO_2}$ ($+4$) are such examples.