Why does a square wave contain more harmonics than a sine wave?
A sine wave is a smooth wave, with no abrupt transitions. A square wave is the most harmonic-riddled wave, since its abrupt changes “ring” up and down the frequency spectrum. One way to form an approximation of a square wave is to add particular sine waves together. All of those sine waves together become the harmonics of the resultant square wave.