The headlines from the last presidential debate focused on President Obama challenging Mitt Romney on issue after issue. There was a less noticed, but no less remarkable, moment when Mr. Obama agreed with Mr. Romney on something — and both were entirely wrong.

The exchange began with a question about the offshoring of American jobs. Part of Mr. Obama’s answer was that federal investments in education, science and research would help to ensure that companies invest and hire in the United States. Mr. Romney interrupted. “Government does not create jobs,” he said. “Government does not create jobs.”

It was a decidedly crabbed response to a seemingly uncontroversial observation, and yet Mr. Obama took the bait. He said his political opponents had long harped on “this notion that I think government creates jobs, that that somehow is the answer. That’s not what I believe.” He went on to praise free enterprise and to say that government’s role is to create the conditions for everyone to have a fair shot at success.

So, they agree. Government does not create jobs.

Except that it does, millions of them — including teachers, police officers, firefighters, soldiers, sailors, astronauts, epidemiologists, antiterrorism agents, park rangers, diplomats, governors (Mr. Romney’s old job) and congressmen (like Paul Ryan).