"Virginity is not dignity, it's the lack of opportunity". This popular qoute is based on the assumption that people are virgin because they lack opportunity and not because they are self-restrained.
However, this is false in most of the cases, as opportunity starts at home. Despite of this, people mostly abstain from seducing or raping their sisters and mothers as they believe in the fact that incest is bad. Hence, the sisters and mothers are usually safe at home.
Apart from this, the question is: Why value virginity so high? Well because a non virgin is a ghost personality. You never 'own' her. Her body might be in your arms, but not her mind which has the imprint of someone else. What if through your body she is still having sex with her first lover? Her mind on which, that first experience is branded forever? No amount of love form your side can override it! The person you love and trust the most can never be your's! Isn't this cruel? The person who now has a right in your property doesn't belong to you either physically or mentally! Isn't this frustrating? Isn't this parasitic on her part?
There are peope who think that illegal sex (one not between married partners), especially pre-marital sex has nothing to do with morality. I however strongly feel that this sentiment is a lie and full of hypocrisy. Why else people hide their past affairs, especially girls? Why do rape victims prefer maintaining anonymity? Why in the times of India-Pakistan partition, people from both the sides disowned their wives who had been enslaved, raped and impregnated by enemies, though Nehru made provisions that women may return to their husbands? People justifying illegal sex are most likely the practitioners of it.
It is in this regard, I feel that Islam is fully justified in flogging/beheading/stoning the practitioners of illegal sex. Islam also does a supremely just job by segregating genders in society, so that their chastity can be maintained. It prevents suspicion among married couple from destroying their married lives. This consequently, gives rise to a society consisting of stable and psychologically healthy families.
*The term "non-virgin" includes either gender indulging in illegal sex and not righteous divorcees.