I have had this issue forever across multiple machines and OS X versions. The primary screen with the dock will randomly change monitors. This will not be reflected in the display settings but cycling the menu bar will fix it.
What causes this?
What causes this?