Hosseni wrote The Kite Runner to show the world the way that common issues of identity, assimilation and power are carried out in his culture in Afghanistan. He spends a great deal of time developing Amir and showing how he comes to a self-identity by the end of the book. He also poignantly shows the difficulties of assimilation into a new culture and country when Baba and Amir move to California. All of this, however, is not seen through American or British eyes, where things are more similar and "Western." He chooses to use these universals and put them in land that, to most readers, is foreign. It's a masterful way to both put us all on the same level as human beings, but also step up and appreciate Afghani culture.
We cannot pinpoint with accuracy why Khaled Hosseini wrote the novel. He even says that the story was imaginary. But we can take a few educated guesses.
First, Khaled Hosseini grew up in Kabul, Afghanistan. He was born on March 4, 1965. His father was a diplomat and his mother was a teacher who taught Farsi. He also loved kite fighting and Western films, like Amir. So, we can say that his childhood, at least in part, inspired his story.
Second, when we look at some of the themes of the book, we can also say that only someone like Hosseini could write this book. As one who left his country to live in America and one who saw his family adjust to a new life in a foreign land, he could draw from his own experiences in describing his main characters Baba and Amir. In other words, personal experiences may have inspired his book.
Finally, when it comes to his more universal themes, such as redemption, we can say that it is a great story to tell (and to read). So, if we combine all these elements, what we have is a beautiful novel.
I suspect that in the end, Hosseini wrote the novel because it was a story worth telling.