Loyola law professor Kathleen Kim said the purpose of sanctuary laws was to ensure that immigrants report crimes and cooperate with law enforcement without fear of being deported.
"The cities and the state have a right under the 10th Amendment to pass what they deem necessary to advance public safety for California residents," she said.
University of California, Los Angeles law professor Hiroshi Motomura said the Trump administration was "attacking California laws that do nothing more than require immigration enforcement to respect the U.S. Constitution."
But analysts were less certain about the prospects of another state law that makes private employers liable for voluntarily cooperating with immigration authorities.
That law requires private employers to give workers 72 hours' notice before inspections by immigration authorities.
"A state can't act in a way that impedes the achievement of a federal objective," University of California, Berkeley law school Dean Erwin Chemerinsky said.
The state could counter that it was simply regulating business to protect citizens, he said.
"It's a difficult question under current law, and a lot depends on the judge's perspective," Chemerinsky said.
Legal analysts generally agreed that the regulation involving private employers was the most vulnerable of the laws Sessions challenged.
"Whenever the federal government is seeking to impose obligations or duties on state and local officers, as opposed to private citizens, the state will have a better chance of succeeding," Kmiec said.