They probably married to squash the Hillary/Huma rumors. I would not be surprised if it was mandated by Hillary herself.
When Huma married Weiner, it looked like he was on the way up, then his political career went soft.
Since Huma's connections to the Muslim brotherhood include both her mother and her father and her boss, it was a terrific get for her to marry this weirdo.
Now, she'll stick around until she's sure he won't add NYC mayor to her list of intimate contacts. NYC mayor has access to an enormous amount of sensitive important anti-terror information. The NYPD even conducts international undercover investigations in many islamic countries.