Baba and Ali grew up together and get along well at the beginning of the story. Baba and Ali have a close friendship, and both of their sons spend nearly every waking moment playing together. Despite Baba and Ali's peaceful and friendly relationship, the two characters are separated by ethnicity and social class. Baba is a Pashtun, which is the ruling Sunni ethnic group in Afghanistan, while Ali is a marginalized Hazara, which is the lower-class Shiite minority in Kabul. Baba is also Ali's employer and allows Ali to live in a small shack in the backyard of his marvelous estate. Since Baba is a Pashtun and Ali is a Hazara, Baba cannot genuinely express his feelings for Ali and publicly display his affection because of the strict social code.
To further complicate Baba and Ali's relationship, it is revealed that Baba was Hassan's father. As an adult, Amir learns that Baba had slept with Ali's wife, Sanaubar, who conceived Hassan. Since Hassan was born a Hazara, Baba did not acknowledge that Hassan was his son and Ali ended up raising him. The fact that Ali is amicable and close with Baba after Baba had an affair with his wife reveals Ali's tolerant, forgiving nature. Overall, Baba truly loves and cherishes his friendship with Ali but cannot express his true feelings or publicly display his affection because he is an upper-class Pashtun and Ali is a lower-class Hazara.
The nature of the relationship between these two contemporaries is explored in Chapter Four, and its importance is of course in the way that the relationship between Ali and Baba parallels precisely the relationship between Amir and Hassan. Note what Amir tells the reader about his father and his father's servant:
Ali and Baba grew up together as childhood playmates--at least until polio crippled Ali's leg--just like Hassan and I grew up a generation later. Baba was always telling us about the mischief he and Ali used to cause, and Ali would shake his head and say, "But, Agha sahib, tell them who was the architect of the mischief and who the poor labourer?" Bab would laugh and throw his arm around Ali.
Although this sounds more like a very close friendship than anything else, Amir then says that never did Baba refer to Ali as his "friend." In addition, Ali is a Hazara, and Baba a Pashtun, so they come from different tribal backgrounds, and the Hazaras were oppressed and discriminated against in Afghanistan. So, although the relationship between Ali and Baba is very close, there are also a number of barriers that prevent it becoming a friendship between two equals; just as in the case of Amir and Hassan, it is always Baba who was in "charge" of the relationship, and Ali who followed after as if he were a servant.