I don't understand harmonics, why do they happen?
Harmonics "happen" when your input to an FFT isn't a pure unmodulated sine wave.

Any unexpected distortion in your input waveform generation (from being exactly identical to mix of sin(wt) + cos(wt)) can be the cause of harmonics appearing in an FFT result (above the noise floor and any windowing artifacts).  

Those harmonics are required to represent the energy of any differences whatsoever between a periodic signal and a perfect sinewave of the same frequency.  If harmonics aren't there, then there can't be any differences (assuming a integer periodic input), because a single result bin of an FFT can only represent a pure sinusoid.