It has always been my opinion that Military Orders had some basis rooted in military logic or purpose. I know the term "Military logic" sometimes seems to be a contridictory oxymoron, and is difficult for civilians to sometimes understand, an order like this regarding civilian marriages throught out the entirity of Hallecks authority, had to be rooted in some sort of reasoning to obtain something or achieve some purpose.
It may have been retribution against the southerners, but that seems all to simplistic an answer, which serves no military objective. And after all this order was issued by Military authority. That is why it seem stupid, it make no sence except for meanness.
If there was no military objective involved in Halleck issuing of this order then the order must be of a political (retribution) nature, and therefore Hallack would have been directed to issue this order by some other person who would have had authority over him.
I don't think such an order would have come from President Johnson, given Johnson's opposition to the Congress and Lincoln's cabinet about reconstruction in the South. So could it have come from from a cabinet member?