I would rather marry a prostitute than a prostitute. What the hell does that mean?

Literally, I would rather marry a prostitute and live a good life than let her do whatever she wants after marrying her.

The connotation is to ignore what a person was like before, and the important thing is not to do bad things now.