Sure. And people use all kinds of things to justify their bigotry, racism and whatever else. The Bible or any other religious book is probably most often used because it's what they know or use.
That said, if there were no religious books, people would still be bigots and whatever else that makes them terrible.