I found the answer. It is a new Mavericks multi-display feature. It opens the application window in the display where the menu bar is active. So to open the application window on the internal display I click on the internal display background and then open the application. I prefer to use both screens as one logical space with my application windows arranged across both screens so I found how to turn it off.
System Preferences > Mission Control > Displays have separate spaces > Uncheck the box.