I think one thing to bear in mind might be that, unlike the Americas, Europeans had a general idea of the existence of Indonesia long before they themselves had travelled there. They wouldn't have been totally ignorant of the region when they first arrived; at the very least, they'd travelled to India by sea a few decades previously. Indonesia might be far-removed from Europe but it's not so far-removed from India that trade and communication were impossible between them.
On the other hand, understanding of foreign religions was a little confused at this point; Europeans knew about "Saracens" of course (i.e., Muslims; Muslims were mostly treated as a monolith as far as I'm aware), but early Portuguese visitors to India apparently managed to mistake everyone who wasn't Muslim for Christians.
So, on the one hand, it's possible that it made perfect sense to them that if Muslims were in India as well as the Middle East (and everything in between), there'd also be Muslims further east in Indonesia. It's also possible that they had knowledge from Indians of what was to be found there. On the other hand, knowledge of the world was so confused (as another commenter mentions, Prester John — the myth that there was a great Christian kingdom somewhere in Africa) that it seems to me they'd have no reason to doubt that Muslims might be anywhere and everywhere.
Can you clarify what you mean by explorers? Explorers in the 16th century "Age of Exploration" on the ocean are a different beast than 13th century land explorers like Marco Polo. Either way, I would argue that 13th or 16h century they didn't react with as much much surprise as you're anticipating; Europe did communicate with between Asia and Africa prior to the Age of Exploration. Check out Sanford's interactive Silk Road website.