Why do coins have dates on them?

Kept track of their total assets, yes.

Kept track of how much of each different denomination from each year was in circulation, no.

That level of bureaucracy is a 20th-century invention. We modern folks are used to our government documenting everything in excruciating detail, but that was not how things were in centuries past.

It’s worse than that.

The “series year” printed on U.S. paper currency is the year of the act of Congress that authorized the printing of that particular note. So, since the last Act of Congress authorizing the printing of $20 bills was in 2004, all $20 bills printed from that point onward are dated 2004, even if they were printed in 2005.

The signatures of the Treasurer and the Secretary are another matter. Paper money is required to have the current signatures of the Treasurer and Secretary on them at the time it’s printed, whether or not those two people were in office during the “series year.” If you comb through many different $1 bills from the Series of 1969, for example, you’ll see different sets of signatures on different ones, corresponding to who was in office at the time of their printing.

In fact, the signatures of the Treasurer and Secretary are the only way collectors have of narrowing down the time period during which a given bill was printed. See the latest edition of Friedberg’s Paper Money of the United States – the book which is to the paper currency collector what the whitman Red Book is to numismatists – if you want to get a feel for how many different ways there are to identify a particular make and model of paper money.