When you use 1111 as the second argument, multiples of 1111 are used as values to be rounded to.
Since 1234 is between 1111 (= 1111 * 1) and 2222 (= 1111 * 2), we need to look to which of those two numbers 1234 is closer, and that is 1111 (abs(1234 - 1111) = 123, while abs(1234 - 2222) = 988).