If Prophet Lut's wife was bad, why didn't Prophet Lut divorce her?

1- Allah wanted to try Prophet Lut (a) and elevate his status. One of the trials of life is to be patient with a bad spouse. It tests one’s faith and patience.
2- To test the people, especially this Ummah. Many Muslims believe Aisha was righteous because the Prophet (s) married her and didn’t divorce her. The example of Prophet Lut is a testimony that a prophet’s wife can be bad and misguided. Muslims must pay attention to such proofs, as Allah is testing them.