Albert Camus wrote The Stranger in the context of his own background as a pied noir-- literally black foot-- or a French inhabitant of an African French colony, specifically Algeria. Through Mersault's perspective we are confronted with insight into the attitudes of the pieds noirs. The way he responds to his environment is interesting because while he was born in Algeria, there is an omnipresent allegiance to France and specifically Paris. For example, his boss seems shocked that he would not jump on an opportunity to work in Paris. And Mersault's interaction with his environment reflects this. He seems to detest Algeria, at times. Sunlight, usually a source of life and vitality in literature, is Mersault's demise. Further, his descriptions of the Arabs, not to mention his crimes against them, indicate a distaste for the natives of the place where his lives.
Mersault's seeming dislike for Algeria, though, is offset by a lack of desire to live in Paris and a simple lack of desire to change. In this way, Mersault seems not to belong anywhere and is in fact, a stranger. For a person like Camus, who moved to Paris from Algeria where he was born could feelings of being estranged be only natural? It seems that French colonialism in itself may have fueled Camus' existentialist impulse.