Often Sci Fi shines a light on the best and worst of humanity. Last year I read The Star Diaries by Stanislaw Lem after a glowing recommendation from someone I knew. Each chapter presents a voyage of the protagonist, Ljon Tichy. Tichy’s eleventh voyage took him to investigate the disappearance of over one thousand agents sent to investigate the situation on a planet. 
This planet was inhabited by an all robot society founded by a computer that apparently went rogue after consuming a psychological library including horrible details involving Jack the Ripper, the Boston Strangler, the Marquis de Sade and more. As a result, the robots in this society appeared to have evolved evil sadist tendencies. They were extremely prejudiced, abusive, violent, and more.
[SPOILER WARNING: stop here if you plan to read this book and wish to avoid a spoiler for this chapter]