(Deuteronomy 22:13-21)
You've cited a section that deals with a husband who attempts to declare that his wife was not a virgin at the time of marriage. The punishment (if the charge is proven) seems a rather extreme method for dealing with someone who's crime was to misrepresent themselves as pure. However, considering that syphilis and many other STD's would have been a death sentence, it probably went a long way towards reducing pre-marital sex.
Again, by the Judaic law, such a person would not be innocent, hence the last line about purging the evil (as my translation defines it).
Wanna whip the dead horse again?