Though I can't find any definitive reference at the moment, from all appearances, the file is modified because the statistics are actually stored within it. I doubt that calculating statistics would change image values. Saving statistics in the file is likely just a convenience to provide faster access next time they are needed.
This link from GDAL, for example, shows an option for generating stats when creating an .img file:
STATISTICS=YES : To generate statistics and a histogram. Default=NO
This link gives additional information:
ERDAS IMAGINE uses .img files to store raster data. These files use the ERDAS IMAGINE Hierarchical File Format (HFA) structure. Figure 1, below, shows the different objects of data stored in a .img file. The contents of the .img file is not fixed. Many of the items shown below are optional.
Here is the referenced image showing the file structure where you can see one of the objects is named "Statistics"