Thinking over the settings for the golden age of detection fiction, it was relatively common for a detective to run into a mystery while on vacation. I think that this served two primary purposes, which I’d like to consider in turn.
The first function of encountering mysteries while on vacation is to spread the murders out, geographically. You can see the reverse of this problem in Murder, She Wrote when Sheriff Metzger asked, after the third or fourth murder since he moved from New York City to get away from the constant violence, whether Cabot Cove was the death capital of Maine. Unless you put your detective in a huge city, as Sherlock Holmes was in London, it is rather limiting to have to set all of his cases locally.
That said, a consulting detective can be called in by someone who does not live near him, just as Sherlock Holmes often was. Vacations, then, serve another purpose, too. Vacations give us interesting places as settings.
This is related, I think, to Lord Peter being very rich. It’s worth looking at the quote from Dorothy L. Sayers on why she did this; the detective’s vacation fulfills a similar function:
Lord Peter’s large income… I deliberately gave him… After all it cost me nothing and at the time I was particularly hard up and it gave me pleasure to spend his fortune for him. When I was dissatisfied with my single unfurnished room I took a luxurious flat for him in Piccadilly. When my cheap rug got a hole in it, I ordered him an Aubusson carpet. When I had no money to pay my bus fare I presented him with a Daimler double-six, upholstered in a style of sober magnificence, and when I felt dull I let him drive it. I can heartily recommend this inexpensive way of furnishing to all who are discontented with their incomes. It relieves the mind and does no harm to anybody.
There’s an element of this which I think applies to all writers, or at least almost all writers. We are not a bunch known for actually going on many vacations. Fictional writers do, of course. They travel to book signings the world over to meet legions of adoring fans who wait in long lines to see them for a few seconds. (To be fair, book tours were a thing, once, though like the Wild West they may have lasted longer in fiction than in reality.) Be that as it may, since giving up their personal secretaries and learning to type for themselves, real writers spend a lot of time alone. That’s how the books actually get written.
Sending one’s detective on a vacation can be a good substitute. It also does away with many of the disadvantages of traveling. Plane rides are something to be endured, not enjoyed. The Caribbean may be beautiful, but it is hot in the sun, and for some of us, at least, sunburn is not a highlight of one’s day. No one enjoys donating blood to biting insects. All these inconveniences, and more, can be placed onto the shoulders of our long-suffering detective, while we, in our imaginations, can enjoy only the highlights of the vacation.
What is true of the writer is also true of the reader; it is a pleasure to read about places that incur inconvenience to actually go to.
This question of setting is one that I think mystery writers (though not the great ones) sometimes neglect. That probably sounds like a more sweeping generalization that I mean it; to stand on firmer ground: I, at least, am prone to neglecting it. I tend to be very plot-focused, and as a result think of the setting primarily as it impacts the plot. Obviously, a setting does need to work with the plot and not against it, but I suspect that a good starting point for a mystery is an excellent setting, and then one can consider what sorts of plots would work well in it. At that point selecting characters becomes easier because one has the guidance of the question: who would do such a thing, at such a place? Then just add in some eccentric acquaintances, a romantic sub-plot, and you’re good to go!