18 U.S.C. 1385: The Posse Comitatus Act is just one sentence: “Whoever, except in cases and under circumstances expressly authorized by the Constitution or Act of Congress, willfully uses any part of the Army, the Navy, the Marine Crops, the Air Force, or the Space Force as a posse comitatus or otherwise to execute the laws shall be fined under this title or imprisoned for not more than two years, or both.”
The Act was passed in 1878 at the end of the Reconstruction period. The shameful reason for the law was to ensure that the federal military would not be used to intervene in the establishment of Jim Crow in the former Confederacy. However, the rationale was, before the passage of the Posse Comitatus, and remains, a core American value, that the military should not be allowed to interfere in the affairs of civilian government.
The word “except” in the Act creates some loopholes, but it goes on to say…(except)” in cases and under circumstances expressly authorized by the Constitution or Act of Congress…” It does not give a president a “blank check”. It requires Constitutional authorization or Act of Congress. There are no constitutional exceptions to the Posse Comitatus Act. To my knowledge, there has not been an Act of Congress justifying Los Angeles, Portland, or any other US city.