In practical terms, the reason harmonics "appear" is that linear filtering circuits (as well as many non-linear filtering circuits) which are designed to detect certain frequencies will perceive certain lower-frequency waveforms as being the frequencies they're interested in. To understand why, imagine a large spring with a very heavy weight which is attached to a handle via fairly loose spring. Pulling on the handle will not directly move the heavy weight very much, but the large spring and weight will have a certain resonant frequency, and if one moves the handle back and forth at that frequency, one can add energy to the large weight and spring, increasing the amplitude of oscillation until it's much larger than could be produced "directly" by pulling on the loose spring.
The most efficient way to transfer energy into the large spring is to pull in a smooth pattern corresponding to a sine wave--the same movement pattern as the large spring. Other movement patterns will work, however. If one moves the handle in other patterns, some of the energy that gets put into the spring-weight assembly during parts of the cycle will be taken out during others. As a simple example, suppose one simply jams the handle to the extreme ends of travel at a rate corresponding to the resonant frequency (equivalent to a square wave). Moving the handle from one end to the other just as the weight reaches end of travel will require a lot more work than would waiting for the weight to move back some first, but if one doesn't move the handle at that moment, the spring on the handle will be fighting the weight's attempt to return to center. Nonetheless, clearly moving the handle from one extreme position to the other would nonetheless work.
Suppose the weight takes one second to swing from left to right and another second to swing back. Now consider what happens if one moves the handle from one extreme of motion to the other has before, but lingers for three seconds on each side instead of one second. Each time one moves the handle from one extreme to the other, the weight and spring will have essentially the same position and velocity as they had two seconds earlier. Consequently, they will have about as much energy added to them as they would have two seconds before. On the other hand, the such additions of energy will only be happening a third as often as they would have when the "linger time" was only one second. Thus, moving the handle back and forth at 1/6Hz will add a third as much energy per minute (power) to the weight as would moving it back and forth at 1/2Hz. A similar thing happens if one moves the handle back and forth at 1/10Hz, but since the motions will be 1/5 as often as at 1/2Hz, the power will be 1/5.
Now suppose that instead of having the linger time be an odd-numbered multiple, one makes it an even-numbered multiple (e.g. two seconds). In that scenario, the position of the weight and spring for each left-to-right move will be the same as its position on the next right-to-left move. Consequently, if the handle adds any energy to the spring in the former, such energy will be essentially cancelled out by the latter. Consequently, the spring won't move.
If, instead of doing extreme motions with the handle, one moves it more smoothly, then at lower frequencies of handle motion there are apt to be more times when one is fighting the motion of the weight/spring combo. If one moves the handle in a sine-wave pattern, but at a frequency substantially different from the resonant frequency of the system, the energy that one transfers into the system when pushing the "right" way will be pretty well balanced by the energy taken out of the system pushing the "wrong" way. Other motion patterns which aren't as extreme as the square wave will, at at least some frequencies, transfer more energy into the system than is taken out.