Example:
first turn Surf did 50% of the foe's health.
second turn Surf did 49% of the foe's health.
Why does damage differ when using the same move every time?
That is the damage formula >rand is a random number from 0.85 to 1.00.
So basically, the bit which says random will vary anywhere between 0.85 to 1 which causes the changes in damage that you see.