Religion is not about morality. It is about having a view or vision of reality, which my be quite at odds with the common or habitual view (also called a trance state). Religious texts are more to inspire & shock a person out of their habitual view than to give moral imperatives. The new view of reality may well have moral implications, but these are secondary and flow from that new view. As the writer of Isaiah puts into the mouth of God, “My thoughts are not your thoughts, neither are your ways my ways.” (Is 55.8)
Religious writing often seems backwards to me. Once-upon-a-time someone had a vision that changed their lives. This had profound affects upon the way they lived their life. All they could communicate was what flowed from the vision, not the vision itself. Moral and doctrinal teaching followed. We can only glimpse the original vision between the lines.
Spiritual practice (a.k.a. prayer/meditation/yoga/… ) is to put us in the right space to receive that vision. It is not the vision, nor is it a moral or doctrinal injunction. Do it because you can do no other, not because you want to be good. God is not primarily interested in us being good!