San Francisco is a Free City. It belongs to no one. The Union is the closest Nation to it owning much of California. It would not be unusual for a US Marshall to be working in San Fran. They would just have to work carefully as they have no jurisdiction there. Which is why many a wanted individual tries to escape to San Fran.