Personally, I believe it is often both. Consider a writer in a smaller country like Kosovo. He/she certainly wants to tell the story of his/her people. Being a true patriot creates a certain longing within an individual to share that and often smaller countries rejoice over an author's longing to do so. However, many authors (from all sorts of different countries, even America) write novels so that others can understand the culture. Look at Pride and Prejudice or The Adventures of Huckleberry Finn. Both share an amusing tale, but they also provide glimpses into the culture at the time.
Taking those two examples a step further, I don't believe that authors have to write for other cultures to understand their culture. It could also be that the author wants those 10, 20, 100, 1000 years from his/her time to understand the current culture. Even if it's not their intention, that is often what happens with classic literature (again, Huck Finn and Pride and Prejudice).
Hope this helped!