I’ve heard that these guys were the heirs/descendants/students of the guys who were taught by the prophet Daniel during the time of the captivity and they knew what was up.
I’ve seen that explanation as well. Daniel had been chosen to head the Magi order, and so they preserved his writings. His 70 Weeks prophecy told them when to look for the Messiah.
Israel sat on the border of the Roman and the Parthian Empires and Chuck Missler thinks that the Magi would have arrived as a large semi-military expedition from the Parthia.