Ironically, most of the experiences Hassan has while he is growing up should have shaped him into a very different person than the one he becomes. In The Kite Runner, by Khaled Hosseini, Hassan is born a Hazara, which means he is part of the most scorned class in Afghanistan--and it it something he cannot hide because Hazaras have distinguishing facial characteristics. Hassan's birth into that ethnicity limits his choices in life and essentially shapes his destiny; nevertheless Hassan lives a joy-filled life and does not seem to mind.
Another experience which should have made Hassan a bitter, angry person is the fact that he grew up motherless.
Sanaubar had taken one glance at the baby in Ali's arms, seen the cleft lip, and barked a bitter laughter.... She had refused to even hold Hassan, and just five days later she was gone.
When she sees that Hassan has a cleft lip, she laughs bitterly and tells her husband (a kind, gentle man whom she despises) that this deformed child is the son he deserves. Living life without a mother (who chose to leave when she saw him) should have made Hassan unhappy and miserable, but he is not.
His friendship with Amir gives Hassan great pleasure, though it probably should not because he makes all the sacrifices. Hassan is so willing to be the one who does all the giving in this friendship, and Amir takes advantage of him at every opportunity. Hassan takes the blame for Amir's "crimes" more than once, defends him to the town bullies, and does everything he can to help Amir please Amir's father. In return, Amir bosses Hassan around, makes fun of Hassan's ignorance (because he is not allowed to go to school), acts cruelly to Hassan out of jealousy, makes unreasonable demands of Hassan, falsely accuses Hassan of stealing, consistently allows Hassan to take the blame for his misdeeds, and deliberately fails to defend Hassan when he needs defending the most.
While Hassan is generally a kind, loving, and unselfish friend, he does experience several things which both crush his joyful spirit (temporarily) and shape his future. The first one, of course, is the assault in the alley by Assef and his fellow bullies. The assault is bad, but for Hassan the worst is the knowledge that Amir walked away without trying to help him. This should dramatically alter their friendship, but the changes are only dramatic for Amir. Hassan keeps to himself for a bit and is not quite as joyful and trusting as he once was, but he he still loves Amir unselfishly. Amir is the one who experiences such guilt that he just wants Hassan to go away, and that is the second life-altering event for Hassan.
Amir sets Hassan up as a theif and Baba has no choice but to send Alia and Hassan away. Hassan will spend the next years building a life for himself and his family away from Amir and Baba; however, his commitment and loyalty to Amir and Babar are so deep that, when he is asked to come back to the violent and dangerous city to help take care of Baba's house, he does it. The Taliban hates the Hazaras and eventually kills both Hassan and his wife.
So many of the things that happen in Hassan's childhood should have made him turn into a cruel, bitter adult who cares only for himself; instead, those events seem to have fed his joy and increased his capacity to love. Hassan is a truly honorable and virtuous character, despite all the reasons he had to become something much worse.