That is because of absolute and relative cell references based on dollar symbols in front of either the column letter or the row number or both.
You didn't use the dollar symbol in your cell reference A1, thus making it a relative cell reference. After using the formula for cell A1, Excel will check A2, but also changing the A1 to A2 in the formula.
Try changing A1 to $A$1 in the formula to get the result you were expecting (can also be done with F4 after selecting A1 in the formula).
Does that make sense?