This happens when the monitor resolution is changed. Since the entire desktop (including both screens) is treated as one giant display, when you change the left monitor's resolution, it changes how much of the desktop it can see, and therefore where the next one starts. This too, means that some windows on the left monitor may now be displayed on the right monitor.
When I go fullscreen (with a lower resolution), my (maximised) IDE gets pushed to the next monitor. I would say that this is expected behaviour.