A fundamental problem for regulatory networks is to understand the relation between form and function: to uncover the underlying design principles of the network. Circadian clocks present a particularly interesting instance, as recent work has shown that they have complex structures involving multiple interconnected feedback loops with both positive and negative feedback. While several authors have speculated on the reasons for this, a convincing explanation is still lacking. We analyse both the flexibility of clock networks and the relationships between various desirable properties such as robust entrainment, temperature compensation, and stability to environmental variations and parameter fluctuations. We use this to argue that the complexity provides the flexibility necessary to simultaneously attain multiple key properties of circadian clocks. As part of our analysis we show how to quantify the key evolutionary aims using infinitesimal response curves, a tool that we believe will be of general utility in the analysis of regulatory networks. Our results suggest that regulatory and signalling networks might be much less flexible and of lower dimension than their apparent complexity would suggest.