I've never understood this idea that "clockwork" music (a very subjective judgement any way) is easier to write or less inspired than "unpredictable" music. Bach and Mozart are the composers usually accused of writing "clockwork" music. But if we look at the compositions of theirs that don't run like clockwork (and there are many, not least
Bach's Fantasias and
Mozart's Capriccios), they're always the ones that were written with least effort, in the shortest space of time. They're widely recognized as little more than written down improvisations. Or look at Bach's cantatas: most of them were written in a hurry without enthusiasm, and are among the quirkiest, most unpredictable and least "clockwork" of his works.
Bach published none of his cantatas or fantasias. On the other hand, the works Bach did publish (and therefore which he probably worked hardest on, and considered inspired) are the
most "clockwork": the
Goldberg Variations,
Art of Fugue, keyboard
Partitas, etc. Of course, some composers were different. With Beethoven and Brahms, the compositions they worked hardest on tend to be roughest round the edges (the
Hammerklavier Sonata, Brahms's Symphony No. 1, etc.). But the point is it's wrong to think: "This composition sounds perfect. It must be a piece of hackwork." The evidence points the other way.
What makes a piece of music sound "perfect" any way? I think it's caused by a particular harmonic style that was prevalent 18th-century, more than by composers being lazy.