Co’mon now, use your noggin.
If you deny the foreign spouse access into the country… they can’t settle down.
There’s no point banning the marriages per se because people will find a loophole. For example, an Islamic marriage (the same for most religions) is religious ceremony, not legal one.