Okay, so a few things here:
1) Letβs get the unfortunate one out of the way first; while Iβm sure many modern readers (myself included) get a bit of pleasure from Levi and Simeon killing Shechem, after what he did to Dinah, the Genesis narrative doesnβt seem to look at this incident as a positive thing. Simeon and Levi did, after all, wipe out an entire town. Jacob rebukes them for doing this, for now theyΒ areΒ βrepugnant to the inhabitants of the land,β (Genesis 34:30-31), and on his deathbed curses them for their actions (49:5-7).
So why would killing the rapist elicit a response like this? Probably because it contravenes the principle ofΒ βan eye for an eye, a tooth for a tooth, a claw for a clawβ (Exodus 21:23-25). While this principle is later superseded by Christ, for this time period it was extremely important: it was a way of preventing the escalation of feuds and tribal warfare; we see a similar idea in the Islamic concept of diya, orΒ βblood money:β you repay/get repaid the harm that was done, and then you put whatever happened behind you.
By using deceit, murdering all the townβs men, looting the houses, stealing the cattle, and carrying off the townβs women and children for themselves (Genesis 34:28-29), Levi and Simeon did not act in a way that was viewed positively by whoever compiled Genesis into its current form.
2) Now, back to ourΒ βwomen must marry the rapistβ thing. I assume this is a reference to Deuteronomy 22:28-29:Β βIf a man comes upon a young woman, a virgin who is not betrothed, seizes her and lies with her, and they are discovered, the man who lay with her shall give the young womanβs father fifty silver shekels and she will be his wife, because he has violated her. He may not divorce her as long as he lives.β
So, funny story about this verse. Itβs actually meant to punish the rapist. The rapist is expected to take on the role of the husband, and all the obligations that entails, and is not allowed to divorce his wife. The important thing implicit in this commandment is that while the man cannot divorce his wife, the woman is allowed to divorce the husband. She gets to keep the payment (which, by the way, is hers, and not her fatherβs, if she is at an age of majority) if she so chooses to divorce. Hereβs a Jewish source for this.
Thereβs also a debate as to whether these verses actually refer to rape, or consensual seduction. This is possible, because in the passage right before this one (22:23-27), a man who is described as a rapist in far less ambiguous terms is punished by being stoned to death. That being said, I tend to agree with those who say that verses 28-29 are also describing rape, and not just sex outside of marriage.