Societal punishment due to norms wasn't the best framework in any law. It was never the correct way. People always thought these kinds of punishment were the best until it fell upon them.
There was no so-called fairness in the world, even worse in this particular punishment. They were based on public opinions, a tool easily manipulated by the powerful to their will.
When public anger rose and some people manipulated them to their advantage, it became scary. Such was the dark times during the medieval era when religions suppressed many dissidents or any one in doubts.
The worst example should be the eradication of the witch movement. Any women exceeding what they considered the norm were quickly judged.
Another close example was accusing the woman of adultery case. In historical records, the punishments were so appalling for the females yet none even damaged the men. Some women might be willingly doing it while others were forced.