In BBC's Museum Mysteries docus, in the Topkapı Palace episode, they offer their theory for this.
They think that Piri Reis (commander of the navy at that time) obtained maps from ships that passed through the Bosphorus. He was then able to draw a current map of the world from all the diverse information.
They basically explored the world without ever leaving home.