Quote from AAAintheBeltway:
There are laws against the Army conducting domestic operations. Why don't they apply here?
§ 332. Use of militia and armed forces to enforce Federal authority
Whenever the President considers that unlawful obstructions, combinations, or assemblages, or rebellion against the authority of the United States, make it impracticable to enforce the laws of the United States in any State or Territory by the ordinary course of judicial proceedings, he may call into Federal service such of the militia of any State, and use such of the armed forces, as he considers necessary to enforce those laws or to suppress the rebellion.
USE OF ARMED FORCES IN MAJOR PUBLIC EMERGENCIES.--
(1) The President , by using the militia may employ the armed forces , or both, or by any other means, shall take such measures as he considers necessary to, including the National Guard in Federal service, to--
(A) restore public order and enforce the laws of the United States when, as a result of a natural disaster, epidemic, or other serious public health emergency, terrorist attack or incident, or other condition in any State or possession of the United States, the President determines that--
(i) domestic violence has occurred to such an extent that the constituted authorities of the State or possession are incapable of maintaining public order; and
(ii) such violence results in a condition described in paragraph (2)