not executed by someone who thinks that without witnesses it harder to solve a crime (which happens to be very true)
Actually while it is true it works the opposite way many times.
The reason is that homicides get a lot more law enforcement resources to solve, and people work on solving them for years. While a home invasion would be old news much sooner.
Not that either is a minor crime, but the level of resources devoted to homicides makes the likelihood of solving them and catching those responsible much higher than if the home invaders didn't kill anyone.
So when criminals kill the witnesses, they actually insure many times more money, man hours, and better forensics will be devoted to figuring who they were and arresting them. They will have a forensics team and later detectives devoted entirely to that specific case for long periods of time. Rewards may be offered, and even years later the case will interest the type of person that likes to look at cold cases.
While a home invasion, burglary, robbery etc would have blended in to the swarm of similar crimes far sooner and not warranted the devotion of so many resources for so long.
So in reality someone dying in a crime makes the individual responsible much more likely to be caught than if all thier victims survived. It takes the crime from just another violent crime, to the type of crime that gets the best attention, the most capable detectives, and warrants the largest budget while continuing to interest people years after the fact if not solved earlier.
However most of the criminals that commit such violent crimes are not likely to realize that. So it is not going to impact how they act during the crime.