Because you're using the float data type. It can't represent floating point numbers exactly. Read up on it:
here[
^] and
here[
^] .
Think about it. How you do represent an infinite number of values in a finite number of bits? You can't. Sacrifices have to be made to make a data type that can represent a wide range of values that are most commonly used and offer some degree of "accuracy".
You can use the
decimal type[
^] instead. It's a 128-bit type, made for higher accuracy for things like financial purposes, but has a smaller range of values it can represent.