Breyer drew on the Posse Comitatus Act (1878), which prevents the use of the U.S. military to execute domestic law. He noted the use of armed soldiers, military vehicles, and checkpoints, among other actions, as evidence that the National Guard was engaging in law enforcement functions, which are prohibited.
The only exception to Posse Comitatus is the Insurrection Act (1807), which Trump did not invoke before deploying the National Guard. The Insurrection Act allows the National Guard to act as law enforcement in order to quell rebellion, but Breyer determined that the LA protests could not be categorized as such.