Why do floating point additions sometimes produce equal results?
Floating point numbers have limited accuracy. They are stored in the following way: $\pm 1.x_0\ldots x_{n-1} \times 2^y$ (here $x_0,\ldots,x_{n-1}$ are binary digits) for an appropriate $n$; the value of the exponent $y$ is also bounded. The value of $n$ and the bounds on $y$ depend on the exact type of the floating point number.

When you add $2$ and $10^{-18}$, the answer is rounded to $2$ since the contribution of $10^{-18}$ is too small to store in the number (i.e., $n$ is too small). When you add $2^{-55}$ and $2^{-57}$ there is no such problem: this is stored as $1.01 \times 2^{-55}$.

For more, check out one of the multitudinous resources on floating point numbers.