He added, "The easy way out is to try to yell and pretend like I can do something by violating our laws. And what I'm proposing is the harder path, which is to use our democratic processes to achieve the same goal that you want to achieve but it won't be as easy as just shouting. It requires us lobbying and getting it done."
Surprise hecklers have become a staple of Obama's public events, but it's rare that one underscores the message that the president is trying to deliver: In this instance, that the American people support a path to citizenship for those in the U.S. illegally, but Congress is blocking comprehensive immigration reform.
Obama came to San Francisco's Chinatown on Monday to argue that immigration reform would be an economic windfall for the Bay Area and other communities nationwide. In remarks at the Betty Ong Recreation Center, Obama said 35 percent of business owners in San Francisco are immigrants, many of them Asian-Americans.
"You don't have to be an economist to figure out that workers will be more productive if they've got their families here with them they're not worried about deportation, they're not living halfway around the world," Obama said. "This isn't just the right thing to do. It's the smart thing to do."
Obama urged House Republicans to take up the Senate's compromise immigration bill, saying that progress on immigration overhaul is being held up by a faction of the Republican Party. He also reiterated his support for a piecemeal approach in the House if that's what it would take to pass a package of reforms.
But Obama also said, "Just because something is smart, fair, good for the economy and supported by business, labor, law enforcement and faith leaders, Democratic and Republican governors, including the governor of this state just because all that is in place doesn't mean we'll actually get it done because this is Washington, after all, that we're talking about, and everything's looked at through a political prism."
Brendan Buck, a spokesman for House Speaker John Boehner, R-Ohio, said, "The speaker is sincere in wanting to get something done, and we're pleased the president said he can accept the step-by-step approach we're taking in the House."
In addition to immigration, Obama touched briefly on the troubled rollout of the federal government's health-care insurance exchanges. California has signed up tens of thousands of people through its own exchange.
"Even as we're getting this darn website up to speed and it's getting better states like California are proving the law works," Obama said.