How do you know that it changed? I suggest that you print the value after reading it in setup().
Because you did not provide full code, it will be guess work. Possible reasons for unexpected behaviour
- eWrite() is called by accident.
- Writing outside the boundaries of an array.
On a side note, EEPROM.put() and EEPROM.get() can be used to write and read any data type (including integers) without jumping through hoops.