Following feminist historian Gerda Lerner's seminal book "Creation of Patriarchy", a huge volume of research has established fairly conclusively that the subjugation of women preceded class oppression arising from differentials in economic power with the advent of private property. During the hunter gatherer stage in the late paleolithic and early neolithic era when one clan fought with another it was easier for the victors to capture the women than the men. The reason being that the level of technology then was insufficient to keep men captives for a long time. However, with women it was possible to rape them repeatedly and make them pregnant and so less prone to running away. Thus raping has a very long history and is intricately linked to the patriarchal exercise of power by men which later has extended to forcing women into sex work. Currently the way industrial capitalism has developed globally, there are a huge number of males on the move and to cater to their sexual urges there is a flourishing sex work and pornography industry staffed by women, mostly from the economically weaker sections of society, who have been forced into this demeaning profession.
The institution of marriage itself is a coercive relationship for most women who have to shoulder the brunt of the domestic care work in addition to bearing a huge number of children to provide enough male progeny. Over and above this women have to submit to sex with their husbands even if they may not be disposed to do so, something that has come to be characterised as marital rape. Men under the influence of alcohol, which is now freely available illegally in every nook and cranny, tend to be even more sexually abusive of their wives than otherwise.
Finally the most obnoxious form of gender based violence is that perpetrated by the minions of the State, mainly the security forces. In India this is most rampant in areas where there are insurgencies going on as in the North East, the Central Indian Maoist hotbed and Kashmir. However, even in other areas there are frequent instances of police personnel indulging in custodial rape. The State in most cases tries to cover up these acts of gender based violence by its minions because class and gender oppression coincide in such cases to maintain the rule of capital intact. In much the same way as it looks the other way when alcohol is being sold illegally because in the final analysis, sozzled men are much less likely to revolt against capitalist oppression.
Gender based violence is thus endemic and a direct result of patriarchy. So unless patriarchy is countered no amount of law making is going to put a stop to gender based violence of all kinds including the most virulent forms - rape, trafficking and sex work, in the same way as law making has not put a stop to class oppression in liberal democratic societies.