From the Midrash: A righteous couple who could not have any children divorced. They both ended up marrying evil people. The evil women turned the righteous man into a Rasha and the righteous woman turned the Rasha into a Tzadik.
https://www.torahrecordings.com/rebbe/igroskodesh/009/012/2846