variable changing unexpectedly in program, except if adding a Serial.println()

for (int j = 0; j < 25; j++) {Why 25 suddenly?