Where do social preferences come from?