Given the Weberian definition of government I'm wont to go on about, democracy optimises for legitimacy, rather than optimal decisionmaking, speed, efficiency, or any number of other possible goals.