The killings have led to questions about what is driving people to murder strangers en masse.