Why don't years have commas?
The comma convention in numbers is designed to make numbers more readable. When numbers get very big, it's hard to tell if we're talking about trillions, tens of trillions, or hundreds of billions:
Alpha Centuri is approximately 41342000000000 kilometers from earth.
Add the commas, and it's much easier to figure out at glance:
Alpha Centuri is approximately 26,890,000,000,000 miles from earth.
With years, however, there's no need for the comma. I don't think too many people misread 209 for 2009 – not when it's embedded in a date, where it's plenty easy to discern from context.
Maybe by the year 10000, we'll start adding commas to years. (That's right around the time programmers will start working on the Y10K bug.)
There are 2 factors:
4-digit integers can be written without a comma
In (American) English prose, 4-digit integers may or may not have a comma. The choice is a matter of style; both "4000 widgets" and "4,000 widgets" are commonly used. So it's unexceptional that years are written without commas.
Convention
That said, it is simply a convention in written English that ordinary 4-digit Gregorian years don't take a comma. Basically, "4,000" is always a number (e.g. "In 4,000 years, I hope to move to Mars."), whereas "4000" can be either a number or a Gregorian year (e.g. "In the year 4000, I hope to move to Mars.").
Aside: Years outside the basic standard calendar system, such as 5-digit years, sometimes do take commas. For example, Wikipedia's style guide recommends "10,400 BC".
(A possible rationale is that American-style full dates ("January 2, 2000") there is already a comma, so if spacing gets messed up it would be harder to read with two commas. But that doesn't explain why dates are still written without a digit separator in British usage ("2 January 2000") or in regions that use a dot or other mark as delimiter.)
It is because it is a numeric identification and not a quantity per se.
Agreed, the year part of a date indicates the number of years since the beginning of AD. However, in a date, the figure for the year is as much an identifier (name) as the month name or month number is.
Another way to look at it is that you could be the 4,572nd applicant for a certain position. Your registration number, however, will be "4572", an ID, not 4,572.