Muslims going on the Hajj today
From the very beginnings of Islam, in the 600s AD, Muslims believed that Allah wanted them to go to Mecca to pray at the Kaaba at least once in their lifetime. They called this trip the hajj. Most people were too poor to afford such a long and difficult trip, especially as the Islamic Empire got bigger and bigger so that some Muslims lived in Spain or India, a very long way from Mecca. But many man from rich families did try to make the trip to Mecca. Fewer women did the hajj, but for some women the hajj provided an important opportunity to leave home and show their devotion to Allah.
Many young men and women went away from their families for the first time on hajj, like people today going away to college. One of them was Ibn Battuta, who went on hajj from Morocco, in Africa, when he was twenty years old. Another was Zubayda, the wife of the Umayyad caliph Harun al-Rashid. These men and women remembered the hajj as an exciting time when they felt close to God.
The hajj was an important part of life in the Islamic Empire in other ways, too. Because of the hajj, most young men from powerful families left home and learned how other people lived in other parts of the Muslim world. They made friends with other rich young men from other parts of the Muslim world, who might be their allies in politics later in life. They learned to think about those people, and not just about their own home town.
When you got back from your hajj, people back home treated you with more respect. They called you "haji" - like "sir" - and they asked your advice about things. Going on the hajj - and coming back alive! - showed that you were religious, and brave, and sensible, and that you knew about the world.