Practically, I am, nevertheless, compelled to act as if freedom of the will existed. If I wish to live in a civilized community, I must act as if man is a responsible being. I know that philosophically a murderer is not responsible for his crime; nevertheless, I must protect myself from unpleasant contacts. I may consider him guiltless, but I prefer not to take tea with him.
Albert Einstein (1879-1955) German-American physicist
“What Life Means to Einstein,” Interview with G. Viereck, Saturday Evening Post (26 Oct 1929)
(Source)
Edited as "I am compelled to act as if free will existed, because if I wish to live in a civilized society I must act responsibly. I know that philosophically a murderer is not responsible for his crime, but I prefer not to take tea with him," in Viereck, Glimpses of the Great (1930).
What does this quote mean?
Einstein seems to be trying to address the conflicts between a mechanistic view of the universe and humanity, and the desire for free will. Whether we believe in spiritual predestination, or that humans are simply bags of chemicals reacting to stimuli with no more actual independence than an amoeba, we are forced act as though people have free will to act in our own, in order to require responsible behavior.
Or, put another way, no matter how one can justify that a murderer is not responsible for their acts — whether from upbringing or because the universe is on a set course and his mechanical destiny is to murder, society still has to act as though they had a choice in the matter and so hold them responsible; otherwise, murderers would go free.