Because floating point can't accurately represent all numbers, which is by design.
To represent all numbers, floating point would have to have an infinite number of bits. Since a single precision floating point number has only 32 bits, there are rounding errors introduced in unintuitive ways.
To check equality, you typically check to see if the numbers are within a given margin of error. This is what
is_equal_approx() is for.