It was a factor in my leaving my birth faith. Seeing the differences between what the books said and how people acted and the how modern morality didn’t match up with the books.
Morality, like everything else, evolves. Religions try to freeze it in a fixed place. Fetishizes the past, making the living enslaved to the dead. Mohammed and Jesus and Moses and the Buddha are to be perfect people for us.