There is no more necessary evil in piano playing than piano exercises. I would love to be a musical idealist and deem all such exercises superfluous, as what piano students should really be doing their whole time at the piano is practicing actual music. Yet an "instrument" is by definition a means to an end, and they do not play themselves. Playing music beautifully at the piano requires piano technique, which in turn presupposes coordination and facility.
I am not against piano exercises in general; I am only against the ways they are usually played. They are nearly always played totally unmusically and without the slightest sensitivity to sound. Piano students shut off their ears and drill their fingers, not realizing that they're doing almost irreparable damage to their techniques rather than acquiring technique. They may well acquire finger dexterity, but at the steep price of musicality. Such mechanical practicing defeats the very purpose of making music.
Yet without technique there can be no music. Finger coordination and strength must be gained somehow or other, and piano exercises can offer an efficient path to this end. Still, it is vital to understand that there is far more to an artistic technique than mere finger agility. Developing fast fingers without the ability to control subtle dynamic gradations would make for a merely partially formed mechanism.
The best piano exercises are scales and arpeggios. If no exercises other than scales and arpeggios are done, a great deal of fluency can be attained. An enormous amount of piano music consists of scales and arpeggios or fragments thereof. Master them and you will be much of the way to a fluent technique.
By far the most popular exercises are those by Czerny and Hanon, and both are fraught with potential problems. Beethoven's student Carl Czerny became the most famous piano teacher of the nineteenth century and trained virtuosi such as Franz Liszt. He made his fortune selling volumes of technical exercises, many of them produced with the aid of student assistants who were tasked with filling in stock harmonic progressions and finger patterns. They tend to have only limited musical content, which can make them disadvantageous. Still, Czerny had a comprehensive understanding of the instrument and his exercises are full of the most common and useful pianistic patterns.
I have long hated Hanon exercises, as they are stripped of virtually all musical content. Save for scales and arpeggios in all keys, the exercises are all in C major. They are but empty finger patterns, virtually devoid of musical material.
The problem with Hanon exercises is not the exercises themselves, it is how they are played. They are exceedingly dangerous. The danger is that students learn, subconsciously, to separate "technique" from music. In reality, the two are inseparable.
Yet it is possible to play them musically. Each exercise is in effect a miniature musical motive played in sequence throughout a key, and it is every bit as possible to shape these motives musically as it is any other. Indeed, it is possible to "decompose" any piece of music into mere notes, the way a great piece of literature can be reduced to mere letters. There is an inner shape within each motive, as well as inherent emphases within the scale, plus an overall shape, ascending or descending. (For that matter, pitch in music can only do one of three things: it can go up, go down or stay the same.)
Furthermore, Hanon exercises also readily expose inequalities among the hands, and any rhythmic or dynamic unevenness is easily heard even by novice musicians. It is far easier for beginners and intermediate students to recognize unevenness in simple musical material than it is in more complex music.
In essence, piano exercises are patterns. The Hanon exercises have the considerable advantage of being very simple to learn. For most of them, you have only to learn one measure, and then a mirror image of that measure. The pattern then repeats itself going up the keyboard, and back down in mirror image.
Many beginning students have considerable difficulty learning music. Learning a two-part invention by Bach will be an enormous challenge, and students are quickly overwhelmed by having to apply everything simultaneously.
Part of this difficulty in learning stems from finger coordination not yet being developed. Exercises such as those by Hanon are actually very good at developing coordination, not only within the hand but between the hands. Further, since they (generally) use opposing fingers (5 in the left with 1 in the right, 4 in the left with 2 in the right, etc.), they're a useful starting point for developing independence of the hands.
One of history's greatest musicians, Sergei Rachmaninoff, detailed how the Hanon exercises were in fact an important foundation of the great Russian school of piano playing at the end of the 19th century:
During the first five years the student gets most of his technical instruction from a book of studies by Hanon, which is used very extensively in the conservatories. In fact, this is practically the only book of strictly technical studies employed. All of the studies are in the key of 'C.' They include scales, arpeggios and other forms of exercises in special technical designs.
At the end of the fifth year an examination takes place. [... The student] knows the exercises in the book of studies by Hanon so well that he knows each study by number. [...]
Although the original studies are all in the key of 'C,' he may be requested to play them in any other key. He has studied them so thoroughly that he should be able to play them in any key desired.
Rachmaninoff's colleague Josef Lhevinne, universally regarded as one of the 20th century's greatest pianists, wrote:
There is no short cut. One cannot go around or under the mountain. One must climb straight over it. [...] Everybody knows that technic is merely a means to an end; but without this means one does not reach the end. There may not be anything very beautiful about the great, grimy engine of an automobile; but if one would get to the journey's end—to the dreamland of wonderful trees, gorgeous flowers and entrancing beauty—he must have the means. You must travel just so many scale miles and arpeggio miles and octave miles before you arrive at the musical dreamland of interesting execution and interpretation.
It goes without saying that there was far more to the training of these legendary musicians than a volume of basic piano exercises. Even practicing technical exercises for two hours daily as Lhevinne recommended for the formative stages did nothing to damage such pianists' musical sensitivity.
In summary, piano exercises must be treated with great care, as there is the concomitant danger of subconsciously separating "technique" from music and thus damaging one's playing by making it unmusical. The practice of such exercises needs to be carefully supervised by expert teachers who can encourage students to play with a variety of touches, articulations, colors and dynamics. When played musically and transposed to all keys (as a professor of mine once said, an all-C major technique is of extremely limited use!), they are essential components of piano education.