Suppose the circle is intensity 255, and suppose the background is intensity 0. If the rectangle is intensity 128 to 255, it will be closer to the circle's intensity and classified with it, but if the rectangle is intensity 1 to 127 then it would be closer to the background's intensity and so clustered with it. My estimate by eye is that the rectangle is less than half bright.
The problem would not occur when the circle is not there, because then the only two values would be 0 and the rectangle's intensity and those are fairly distinct.
What you should do is threshold against a low level such as (say) 16 and say that anything below that level is background.
and then analyze BW. Or alternately,
BW = IM > Threshold;
PartialIM = IM(BW);