When working with Dual/Multiple Screens in OS X Mavericks and having “Displays have separate spaces” switched on, I noticed that the dock would unpredictably switch monitors from time to time. Fed up with this I spent a Google Search Coupon on the issue and guess what: it’s not a bug, it’s a(n undocumented) feature.
To move the Dock to any other monitor, move your mouse cursor to that monitor and – without clicking – pull downwards so that your cursor hitting the bottom edge. After a while the dock will appear right there. Looks like I unwillingly was performing this a few times.
It’s a handy shortcut, but if you don’t know about it it’s very confusing.