Those are certainly not the thoughts of any god I would put any faith in, never mind worship. That book is chock full of morally repugnant shit.
This is what is so weird to me about religious stuff - the need to “interpret” all the horrors away is just crazy. It’s the polar opposite of verify, don’t trust.