This question already has an answer here:
I have a iMac running OS 10.9.3 that has 2 monitors connected to it.
Randomly, thourhgout the day the dock will flip either to the left or right screen. Its pretty annoying.
Does anyone know what is causing this or how to fix it?