The answer has changed over time. Initially (Heron), they were explorations into the use mechanical principles to amuse and amaze. This held true for hundreds of years, even up to the time of Jacqeut-Droz. At that point, they were meant to amuse and amaze, but there were two other roles. First, they served as advertisements for the clock-maker...to show how masterful he was at his craft and to sell more clocks and watches. Second, there was a growing mindset -- following Descarte and Newton -- that all of creation was a machine. By creating very realistic automata, I believe they hoped to learn more about the actual systems of the body -- about life. So they had something of a scientific motivation as well. Vaucanson's duck would be a prime example.
As time passed, automata continued to serve as entertainment, but to different social classes. Initally, the finest automata were shown to royalty, in the late 1800s they were high-end amusements (i.e. Robert-Houdin, Vichy, Roullet and DeChamp) and eventually came to the masses with the advent of mass production. This trend continued to the point where plastic toys are the modern day equivalent. So there is another trend from adult to child as the primary audience.
What can we say about automata in general, then? Automata are mechanical devices that have some ability to act on their own to represent living objects (people, animals, and plants).
Contemporary automata -- the type made by CMT and myself -- are a swing of the pendulum back to adults as a audience, back to hand-crafting, back to higher prices. They are not unlike comics in that they are typically funny and often make some form of social commentary. Their popularity, I believe is in their humor, the sense that they were made by a person, and that their workings are comprehensible to almost everyone. People like to laugh, to see human ingenuity, and to understand how things work. Contemporary automata are empowering in some small way.
The continuum from toy to automata has no hard dividing line. Who is it made for? How was it made? How many were made? How much does it cost? I can charge a lot more for an "automaton" than I can for a "Wooden Mechanical Toy", so there is an element of marketing spin involved.
The scientific aspect now belongs to the roboticists and the computer scientists. Where is the divide between robot and automaton? I would say simply the addition of electronics in the automaton itself.
I seems like I should makes some diagrams to show some of these concepts visually.