It can be attributed to common sense and the blessings of Allah that our ancestors had open hearts and embraced the final revelation. Additionally, the guidance of the Prophet, who advised leaving the Abyssinians alone as long as they did the same, explains why the caliphates did not engage in campaigns of conquest in the Horn of Africa.
And main reason is fascinating to learn that our ancient Somali ancestors practiced a monotheistic religion. They believed in a single supreme being without images or idols and recognized the existence of an intermediary spirit between humans and God. Their belief system included laws and orders, and they regarded certain individuals as messengers, similar to priests. Their belief in a holy book, even if it was lost in a cow's belly and sought each year through sacrifice, indicates a strong connection to divine guidance.
When Islam arrived, it likely resonated with them significantly. The concept of a holy book and a messenger would have aligned with their existing beliefs, especially given the proximity of the region where Islam emerged and also they probably took Prophet Muhammed as messenger from Waaq. The idea of a supreme being without partners, the creator of everything, and the existence of different nations in various lands would have found harmony with their worldview.