In California, the City of Los Alamitos has declared that they refuse to abide by California's sanctuary status. Therefore, they have chosen to opt-out of California's sanctuary law (A.B. 54). Other cities, and Orange County, are hearing the call, and have decided to follow suit. California cities and counties not only have every right to opt-out of the State's ill-conceived and unconstitutional sanctuary State status, they are obligated by law to do so.
Immigration is a concurrent issue. What I mean by that is that the federal government and the States both have certain authorities regarding the issue.