Most murderers aren't intelligent and commit the crime by accident or through negligence. So they get caught because it's sloppy and their clean-up work sucks ass. They also don't dispose of the body properly so it gets found and everything unravels from there.