Some are allowed to be married...
We had a married priest at Ft Hood when I was there. We asked this same question to him. He said, he was a married Episcopalian minister and entered the catholic church as a priest. Ergo, allowed to remain married.
God "instilled" in all men a strong desire to have the companionship of a wife. That need is almost as strong as the need for air and food.
Periodic celibacy? OK,I can accept that that might be pleasing to God...but lifelong is more difficult for me to understand.