Sort of.
There are different types of riders. Some are better at going up hills, some are better at Time Trials, some are better at sprinting, etc (same as runners, marathon runners, hurdlers, sprinters, etc).
When there is a flat stage and it finishes with a bunch sprint, the time gaps are very small. Especially considering, as Russ said, that any groups that come over the line together all get the same time.
So, for example, Cavendish could win 4 flat stages in a row. They would all be bunch sprints and he would finish maybe 2-3 seconds ahead of wiggins (who is in the main bunch) each stage.
So after those 4 stages, Cav is ahead of wiggins by about 10 seconds.
The next day, there is a big climb. Cavendish (and all of the other sprinters and riders who struggle on the hills) get dropped from the main bunch on the climb. Wiggins finishes in the front group and Cavendish finishes in the next group 28mins behind.
So, now, Cavendish has won 4 stages and wiggins has not won any, but when you add up their times, wiggins is 27:50 in front of Cav.