He didn’t have much choice, because Saudi law is based on Sharia, which in turn is based on the Quran, and on the words and example of Mohammed.
For Muslims, Mohammed is the model of a perfect man. Mohammed’s words and actions are, after the Quran, Islam’s primary guide to the will and mind of God.
Mohammed married a six year old girl, Aisha. So for any judge working under Sharia law, there can be no question – such marriages are legal, and acceptable in the eyes of God.
Mohammed refrained from having sex with Aisha until she was nine. The 47 year old in the CNN story linked above has also said he will wait until the girl reaches puberty before consummating the marriage.
So that’s all right then. Not.