A spy of a particular agency needs to travel stealthy or in disguise to enemy countries and need to shadow on the intended target, to collect information about the target or even wreck the target.
The intended target could be a living person or even a location and installations. So, observation of these targets helps the spy cum writer, in safeguarding his country’s interest as well in hurting other countries interest, and in due course of time, to translate targets into characters and settings of his stories.
The person or location they are observing may exhibit many layers of qualities, which can be grasped for use in the story. So spying could bring the persons in real life to characters in fictional life. Also, as spy life involves lot of strategy, action and adventure, the Author could replicate all these in his/her stories. All these could be replicated in the stories in the form good plot, gripping scene and character’s travel through the story, and in many more ways. It is not that one, who lives, inside four-cornered house, couldn’t script a stories but the one who does spying will a have a treasure strove of sources to form a story. In this way they would be able to pen their stories with lot of inputs. So good numbers of authors who lead a double and secretive life of a spy have used their spying experience and observations that is part of their spying, as part of their written works.
As an agent and writer Somerset Maugham was considered to be an important link in the category of spy cum writers starting from Christopher Marlowe, Ben Johnson and Daniel Defoe to the modern day writers Graham Greene, John Le Carré, John Dickson Carr and Ted Allbeury.