Religion is in the Heart
It would be unrealistic to see religious scriptures as exact words of God. What is written on scriptures can be influenced and reinterpreted by the writer. Sometimes these texts are sourced from the word of mouth and in the process original meaning could have been lost. Religious texts are subjective to the times as well. What may have been right in the past might be wrong and impractical today. May be that is why there are so many sects within religions and there are many contradictions as well.
If an acts does good to the doer and others that kinds of acts should be done. If an act does harm the doer and other, they should not be done. That is an easy formula to distinguish the good acts from the stupid acts.