Why do two different E. coli reference genomes have different lengths?
U00096.2 is an updated version of U00096.1; you should preferably use the former for your analysis. In fact, even U00096.2 has been updated. The latest version is U00096.3. In general, the number after the dot (period) in NCBI accession numbers, denotes the version. 

From NCBI:


  VERSION is made of the accession number of the database record
  followed by a dot and a version number (and is therefore sometimes
  referred to as the "accession.version")