Given the beauty of modern dressage, it no doubt comes as a shock to many people to learn that dressage was initially developed for the cavalry. The same dressage skills that lend a horse grace in a competitive arena at the same time enable the horse to twist out of the way of an approaching sabre, to form up with a devastating line of cavalry set to charge, or to circle quickly in order to bring an injured cavalry officer safely behind the lines. If it weren't for these military applications for good horsemanship, it's unlikely that we would even have dressage as we know it today.
Dressage was first developed in Greece by Xenophon: Athenian historian, disciple of Socrates, and cavalry officer. Xenophon applied the nascent philosophical training he received from the great Athenian philosopher--as well as his experience with the cavalry--to the art of horse training for military purposes, writing the classic treatise on the subject (Hippike, or On Horsemanship.) In his search for the root of ideal horse training, Xenophon hit on the idea of training horses by teaching the horse to trust humans and allowing the horse to enjoy itself while performing complex cavalry maneuvers--a clear improvement over older methods of punishing the horse for its failures. Strangely, Xenophon's treatment deals not only with training horses for cavalry use, but also for state functions and parades--an indication of both courses that the evolution of dressage would take over the centuries.
The practice of dressage declined and rose as the role of cavalry in military operations became more or less prominent. Surprisingly, a low point in the history of complex dressage came with the Middle Ages and the ascension of the knight--although knights were the most technically superior weapon in the feudal arsenal, the heavy armor a knight was obliged to wear made the fine control of full dressage at times irrelevant, and at times impossible. Dressage in full was still practiced by the light cavalry of the period, however--mounted bowmen were typically unable to wear heavy armor, and so relied much more on the agility of the well-trained horse and their own skillful archery.
With the early modern era and with the move away from heavy cavalry and toward light cavalry dressage finally came into its own. Young lords and other officers, armed with early pistols, muskets, and eventually rifles, had not only to maneuver in combat in order to survive, but also to coordinate increasingly larger armies and move quickly back and forth on the battlefield. The tight control of dressage was necessary for this kind of battlefield movement. More maneuvers began to be developed around this time, as well jumps like the capriole could be used to clear entire lines of enemy infantry, while momentary halts like the levante could place the horse in the perfect position for a quick shot or a sabre slash in the right place.
With the advent of modern infantry, cavalry lost nearly all of its military usefulness, and dressage reverted to its earlier, more peaceable form, as hinted at by Xenophon. Of course, the practice of dressage has changed somewhat with the transition of the art from a cavalry discipline to a sport. Some of the flashier moves of modern dressage--jumps such as the ballotade, for example, or many of the more ornamental figures which involve the horse rearing up or otherwise exposing its underbelly--are often counterproductive in a combat setting (as beautiful as a ballotade may be, its beauty doesn't make up for the possibility of a savvy opponent firing directly into the unprotected underbelly of the horse.) But however the art has grown over the centuries, it's impossible to understand the beauty of dressage without understanding its dark other half--the rivers of blood and trampled uniforms over which the well-trained horse nimbly leaps.