Each iteration reduces the size of x, so theoretically x will never be greater than or equal to 13, right?
Sure, if ints behave just like integers. But they don't. Int's have a maximum and minimum size, because of how they stored in your computer. In Java, an int is a 32-bit signed number; an int's maximum size is 2^31-1; it's minimum size is -2^31.
What happens when x is the minimum size, -2^31, in that loop? -2^31 - 1 < 13, so why does the loop condition fail? That number can't be represented by an int. The way ints behave is that they wrap around.
int x = Integer.MIN_VALUE; // x = -2^31
x--;
x == Integer.MAX_VALUE; //True. x == 2^31-1
2^21 - 1 is larger than 13, and the loop condition fails. The print statement is run when x is Integer.MAX_VALUE. And what is the value of 2^31 - 1?
2147483647