Baba's relationship with Amir is very different from Hassan's. Baba is not there for Amir, because he doesn't understand why Amir isn't exactly like him. Baba is actually angry at times that his son, Amir isn't a reflection of himself, because he wants Amir to carry on his name, his machismo, and his business. Baba is very emotionally distant from his son, because he feels there is no real connection between the two of them. Amir's early years are very tough on him, because he lost his mother during his own birth, blames himself for his mother's death, and of course lacks a relationship with his father. And it's a struggle for Amir to please or satisfy his own father, because simply cause Baba doesn't acknowledge that much.
On the other hand, Baba's relationship with Hassan is much more different that Amir's, because Baba is very loving towards Hassan, and attributes that love to Baba's own giving nature. He gives him way more attention towards, because Baba is actually Hassan's father.
Amir does not find out until years later after the others have died. He realizes that the harsh love shown by Baba towards him was designed to strengthen him and make him sympathetic towards Hassan and his people, since they are all more closely related than he ever knew. He also realizes that the love Baba shows to Hassan is from a true father towards a son, although Baba is never able to truly tell Hassan how much he means to him.