You wrote:
“Then the church should allow them to get married. Problem solved.”
The Church did allow them to marry. That’s what they left the active priesthood to do. Problem solved.
No, they should have been allowed to marry and continue in the Catholic priesthood, but you already knew that.