When I think about the classic period of crime fiction known as the Golden Age, there are a few things that spring to mind. A certain type of detective, often with some quirk to set him or her (but generally him) apart. Upper class white people. Often large houses with staff who knew their place, except for when they had a deadly secret to keep. Anyone considered "other" was viewed with suspicion. To avoid the racist cliches that were starting to crop up in the genre, author Ronald Knox included the following as one of his 1929 "Ten Commandments" to follow when writing crime fiction: no Chinaman must figure in the story.
It didn't occur to anyone at that time that you could include people of colour and think of them as real people instead of stock characters.