While this would be a terrible solution in today's society, back then it was an effective punishment, as the rapist had ruined the girl's social value and severely limited her chances of marriage.
A good read on it here: "This is not a matter of having the rapist be one's loving partner, or cohort for further sexual relations."
"While this would be a terrible solution in today's society, back then it was an effective punishment"
For who? The only one really being punished is the victim. Duh...she gets raped and no telling how she was otherwised damaged in the assault, then gets stuck with a man she could never trust not to harm her again or kill her to get rid of her later. That's a terrible solution for the victim in any society.