Can a sketch write to EEPROM while it is running.?

The example code is very useful CrossRoads. However, I have a few question about it. Suppose that I'm doing a test for 255 (0xFF), which is the value read back if EEPROM hasn't been written to yet . Why then in the code you sent me shall I store data after the if statement? Why I have to put EEPROM.write (0,21) if I am just trying to know what values were already stored? And yet another question please: that if statement should go In the setup or in the loop?

I tried other retrieving code that I have used before, but now in an Arduino where I have never written anything in the EEPROM before:

 #include <EEPROM.h>
void setup(){
Serial.begin(9600);
}
void loop(){
byte x;
for(int i=0; i<3; i++){
x = EEPROM.read(i);
Serial.println(x);
}
delay(800);
}

On serial monitor the values shown where like this:
105
255
255
105
255
255
......
......
Is the above the 255 (0xFF) message? If it´s not, why I don´t get it as I should?

Thanks your for all the help given so far.