On your list, Mad Giant, so much of it, I feel the same way. I just scanned your list, didn't read each specific thing.
For example, it's my theory that the taboo on homosexuality in some societies began with inheritence issues. In societies where land was left to the oldest son, what if he was an only son and he was homosexual? Then if he had no children, it complicated inheritence and the land staying in the father's direct line of heirs.
I am a theist, a non-Christian universalist, but when my grandson's were baptized in the Episcopal Church, I chose a lesbian couple to be their godmothers. Everyone knew they were lesbians.
I believe that fear is the best tool with which to control people. Fear works better than brute force and it's cheaper than prison. If you are a ruler, you're going to look for the most effective way to control your subjects. Why not convince them that their god(s) will get them if they don't follow the rules you want them to?
If you take god(s) out of the picture, many religious laws cover common sense and ethics. Or they address practicalities. An example would be extra or premarital sex. Let's say you have a whole village of people who have never even had a thought of god or gods. But you have young teenagers getting pregnant. The girls don't get the chance to fully mature and their health and emotional health suffers. Then you have parents and grandparents, other villagers raising the babies. You have married people running around having affairs. No one can be sure who the baby's fathers are. There is jealousy and there are fist fights and worse, maybe even murder, as consequences. Your little society is breaking down. So as the ruler of this village, you and your advisors come up with a code of ethics to try to turn the chaos around and get some order back to your village. So you make laws that address premarital sex, teen marriages and extramarital affairs. Maybe you decide that babies outside of monogamous marriages are to be considered illigitimate, unable to inherit land. A ban on homosexuality might come after jealous fights or inheritence issues. What if you are trying to up the birth rate in the village?
If you are the ruler in a godless village, you might decide you don't want your villagers doing anything you don't like. You might make laws against those things. Now, what if you are a ruler in a village where people believe in a god or gods? Here is an extra tool for you to use to control your villagers.
Anywhere you have people, godless or with god(s), you're going to have issues. If you look at societies where religion is banned, they still have the problems that societies with legal religion have. It's just that no one can use religion as a scapegoat. There is both good and bad in any human institution. Banning human institutions won't get rid of bad laws and prejudices. People are given to prejudice. We all have to deal with it. No matter how good a person you are, inside you, there is prejudice. How you choose to deal with it is key.