In an ideal world, everyone's clocks would strike 12 noon just as the Sun reached the highest point in its path across the sky. But clock- (aka "standard-") time and solar time rarely overlap, with one generally leading or lagging behind the other – a fact this map by math blogger and Google engineer Stefano Maggiolo clearly illustrates. [Click here to enlarge.]
Why do these discrepancies exist? Maggiolo offers two important reasons:
One is that (solar) days do not all have the same length: the modern calendar compensates by letting midday oscillate a bit around the year: for example, midday in Naples goes from 11:47 in early November to 12:17 in early February... More importantly, each city at a slightly different longitude would have a slightly different time. It seems strange that time systems with such a huge problem had ever been practical, but in the pre-industrial-revolution world, travels were so uncommon and slow that this problem was no more than a minor annoyance.
The transition from apparent solar time, where all days have different lengths, to solar mean time, where midday wanders around 12:00, was caused by the proliferation of mechanical clocks in the early 19th century. The change to a time zone system, to solve the second problem, was caused instead by the telegraph and even more by the spreading of railway networks in the second half of that century; it's not a coincidence that the first country moving to a common time was Great Britain.
Indeed, if we acknowledge that the two problems must be solved, the natural result is the current time zone system. The immediate consequence is that in the western part of the time zone the sun rises and sets later than in the eastern part. Normally, these differences amount to at most half an hour in either direction, but human geography sometime forces greater differences.
Other explanations for major solar/standard time-discrepancies are often political in nature. In China, for example, all clocks are set to Beijing time; in the country's westernmost reaches, solar noon happens at around 3 in the afternoon. The opposite is true in India (which also adheres to a single time zone), where a summer sunrise in the far-eastern state of Assam begins at 4:30 a.m. And don't even get us started on Antarctica.