Every author throws a little of themselves into their stories. The main character may have similar tastes or habits or quirks. The setting is probably somewhere very familiar to the author, or even if it's made up, it probably has similarities.
Stephen King is famous for doing this. Many of his works are set in the areas of Maine he frequented growing up. Even works like The Shining were influenced by places he'd lived or spent time in. We see hints now and then of his jobs, such as in The Mangler, where he worked in a commercial laundry.
I know I do this. Many of my stories are set in and around Washington State. I grew up here, and it's easy for me to fall back on the area in some way, if not outright set my stories here. Many times I find myself giving a character a background from the Pacific Northwest or some other ties to the area. It's natural, because I don't have to do as much research to make it accurate and believable.
A lot of times I find the main characters tend to have a lot of the same opinions or views on life I do. It comes naturally to write them that way. It's easier to relate to a character that mirrors you. It keeps you inside a writing comfort zone, and that often helps get words down on paper.
Those things are largely unconscious choices. Sometimes it's intentional, but usually it just feels natural to set a story in a particular place or give the characters certain personal aspects similar to mine. Usually it's just what feels right in the story.
Sometimes I do it on purpose. Because it's fun. I love to throw little bits and pieces of things into my stories that link them together. When I can, I'll generally throw a reference to the Seattle Seahawks into stories. It doesn't come up often, but it's fun. Usually it's a main character with a background from this part of the country who happens to like the team. Sometimes it's a more obscure reference. Often I'll substitute the Mariners or another local team if it's easier or it fits better in the story.
The military, and especially the Navy is another one I'll throw in there somewhere. With of the best years of my life running around the world courtesy of Uncle Sam, it's easy to see this one. Sometimes it's background, and sometimes it's just a reference. I don't write military fiction, so there's not a lot of it in there. Just enough to spice it up every once in a while.
I put a lot of my own personal experiences in as well. Not everything is taken from personal experience, even some things you might swear are, but when I can, I like to do this. Oftentimes other people have been there with me or experienced the same thing, and to me it's fun thinking they'll get that little surprise familiarity reading it someday. The anticipation I feel writing it is why I do it, knowing that someone out there is going to think, "I was there and did that exact same thing!" That's an awesome feeling, and it makes writing the story all that much better an experience.
It all boils down to the readers. It all boils down to the anticipation of their reactions reading my stories. Knowing they'll relate in some way or another, and being able to shape that reaction based on what I write. It's just one of the many little things that drive me to write.