Murderer 'driven by hostility to homosexuality'