For example, whenever a married person is murdered the first suspect is the surviving spouse. Who else knows you well enough to want to kill you?
Therefore the police have a place to start in most cases, they know that the murderer is likely someone the victim knew, and they can fairly easily locate and investigate those people.
A prostitute? Maybe it was a regular, but just as apt to be a stranger with no discernible connection to track down. Where do you start? You can narrow it down to what? Everyone with a penis and a few bucks? Everyone who would be jealous of someone horning in on their guy or corner?
What's a cop to do? All he can. Not much. Odds are the victim is a runaway or a throwaway kid, her (or his) loved ones, if she has any, have lost track of her, and therefore she's less apt to have relatives keeping the case near the top of the pile.
Inevitably the cases that can be solved with available resources get those resources.
The cop gathers and archives as much physical evidence as possible and interviews the victims colleagues, but doesn't really expect anything to break the case open. About the best he can hope for is that the perp doesn't strike again, and/or that he shoots off his mouth.
My hat's off to guys who can do this sort of thankless drudge work, knowing that many times they will never solve the mystery.