My question is that why premartial sex is punished by the state in Islam? I mean, it is entirely the personal matter of two individuals, regardless of their faith. If two muslims commit premartial sex, God would punish them in afterlife. And if two non muslims commit it, they are not bounded by Islam so they shouldn't be punished. But why does the state punish them? Specially if its done in private? Its a non violent act. I mean its not like robbery, murder or other crimes that affect other people.
The main reason for the prohibition of pre-marital or extra-marital sex is to safeguard the family as an institution. Islam like other religions, recognizes family as the main building block of human societies.
The importance of living together as a family can be understood by looking at the life cycle of a human being. When he is born he is weak and is capable of doing nothing by himself. He needs care and proper guidance until he matures into adulthood. In his adulthood he is finally able to contribute constructively to the society. And his strengths get gradually reduced as he becomes older. Without a strong family unit, it would be impossible for him to get through the stages in his life when he is weak.
A strong family needs a mother and a father; to care and to provide. The absence of trust or the absence of a full commitment between these two to each other, would result in a disrupted family life. This in turns leads to the creation of human beings who are incapable of contributing positively to the society.
Islam wants to prepare human being and wants him to adopt a lifestyle that would help him avoid all the things that might lead to a dysfunctional family. These includes pre- and extra-marital sex. They both have a very strong potential of disrupting a family life to say the least. Pre-marital sex makes him prone to a lack of commitment and orients him toward seeing this relationship as merely sexual. Where as extra-marital sex leads to the destruction of trust.
To avoid values such as open sexual relationships creeping into societies, Islam sanctions punishments for individuals who act utterly irresponsibly and break down these boundaries. It doesn't concern itself very much with what individuals do in private, but if their actions are so brazen that they engage in such acts openly and could careless even if a group of adults witness them doing the act, it draws the line and wants to put a stop to it.
- I'll refine and rephrase the answer soon
Because it is a rule set down by Allah. It is zinah, and zinah is forbidden, because it could only bring us into difficulty. This law is for the better of a society, because if people committed premarital sex like it's normal, women would suffer badly if not the men. There would be marital problems, and a high divorce rate, like in the U.S. And one reason is that it sets us apart from other animals. Allah is the Most Wise, the Eternal. He set these rules to guide us to the straight path. Imagine if your daughter or sister were involved in such an act. Disobeying Allah's laws for a moment of pleasure would only result in a lifetime of regret and shame.
Although is a personal matter, liberalising such behaviour does inevitably lead to worse situations. Consider the fact that such behaviour is perfectly fine in western countries and as as result you have high number of abortions, females with no husbands and looking after their newborns because they decided not to abort, diseases as a result of being careless and so on.