I have just had some strange RAND results, which I have narrowed down to a simple repeatable case. Am I doing something wrong?

I have filled 20,000 rows with 3 columns. Column A and B contains =ROUND(RAND()*2,0)+1, to generate a random integer between 1 and 3. C1 contains =IF(A1=B1,1,0), C2 contains =IF(A2=B2,1,0), etc. Basically column C is set to 1 if the random numbers in A and B match, otherwise it is set to 0.

The average of columns A and B are close to 2, as expected. However, the average of column C is always around 37%, instead of the expected 33%.

Can anyone help with this please?