Also, National Guard personnel can be deputized by State Governors with Law Enforcement authorities, like arrest, without violating the Posse Comitatus Act, which otherwise excludes the Military from domestic Law Enforcement.
Posse Comitatus does not apply to the military used for border enforcement. I do not know where that crazy idea got started the idea that the military cannot patrol borders?