To illustrate the gulf between the nation’s costly health care and its underfunded public health, Alfred Sommer, former dean of the Johns Hopkins Bloomberg School of Public Health, often tells a story:

When people wake up after triple bypass surgery at the famous hospital across the street in Baltimore, they typically thank their doctors for the lifesaving miracles they performed — and sometimes even make donations to the institution.

“Nobody wakes up in the morning and says, ‘Thank God I don’t have smallpox.’ Or, ‘Thank God my water is potable,’ ” Sommer said.

That in a nutshell, says Sommer, is the conundrum facing public health as it tackles the coronavirus crisis. Its largely preventive mission, aimed at protecting the entire community, has been consistently overlooked in a country that puts a premium — and spends more money per capita than any other — on treating individual sick people. Its victories are soon taken for granted. And these days, as the vaccine debate demonstrates, its science is increasingly challenged.

“We have an illness-care system not a health-care system,” said Betty Bekemeier, director of the Northwest Center for Public Health Practice at the University of Washington School of Public Health. “The amount of money spent on keeping us well is tiny.”

Public health departments are where disease surveillance starts, as well as tracking “reportable diseases,” such as measles, providing a picture of where and how infections spread. But research shows that only about $19 per person per year is spent on public health, in contrast with about $11,000 per capita spent annually on treatment, Bekemeier said. Investing more in public health, she said, “would save us a tremendous amount of dollars on the other end.”

Public health, which competes for tax dollars like other public services, has proved to be an easy target during times of austerity. And the losses might not be widely recognized until a disease outbreak sweeps through a county. “The impact of public health . . . doesn’t get shown until something major like this happens” said Peter Beilenson, director at the Sacramento County Department of Health Services, who said the department’s budget was slashed in 2008 and has still not recovered to its prerecession levels. The county recorded its first coronavirus death Tuesday.

At a House Oversight Committee meeting Thursday, Anthony Fauci, director of the National Institute of Allergy and Infectious Disease and a member of the president’s coronavirus task force, was asked why the United States has had widespread challenges providing tests for the virus.

The idea of anybody getting it easily the way people in other countries are doing it? We’re not set up for that,” he said. “Should we be? Yes, but we’re not.”

The country that produces some of the most sophisticated public health research in the world, from the Centers for Disease Control and Prevention as well as private institutions such as Hopkins, Harvard’s T.H Chan School of Public Health and Columbia’s Mailman School of Public Health, relies on an underfunded and decentralized patchwork of services for its own population.

“Our public health ‘system’ is not a ‘system,’ ” said Sommer, who produced groundbreaking research on the smallpox vaccine and later saved the sight — and lives — of countless children by demonstrating how they could be treated with low-cost vitamin A.

Instead, public health is provided by almost 3,000 agencies in states, counties, cities and small towns. Those departments have responsibilities that extend far beyond tracking and responding to epidemics and include monitoring food safety, tackling sexually transmitted diseases and addressing the opioid crisis. All those functions compete for stretched resources in the face of a new disease.

Washington state, the epicenter of the novel coronavirus in the United States, has been wrestling with an outbreak of hepatitis A among the homeless and an increase in measles cases, as well as a rise in maternal deaths, according to Bekemeier.

When a crisis hits, “these things end up going on the back burner,” she said.

Jeffrey Levi, a professor of health management and policy at the Milken Institute School of Public Health at George Washington University, said an expert panel concluded recently that the country needs about $32 per person annually — or an injection of $4.5 billion — to supply basic public health services that provide prevention and health promotion in much the same way people expect a functioning fire department, library and police force.

“It seemed like a lot a year or two ago,” Bekemeier said. “But now, when we have to turn around and spend more than $8 billion [on the coronavirus response], it doesn’t seem like such a bad investment.”

Experts say, only 51 percent of the population is served by such a comprehensive system.

Levi and public health policy experts — including Karen DeSalvo, who served as acting assistant secretary for health in the Obama administration — have been pushing to secure a Public Health Infrastructure Fund that would make permanent basic resources available to state, territorial, local and tribal governments.

The recommendations would also address structural issues, Levi said. While some cities such as New York and Los Angeles have strong public health departments, many states, including North Carolina and Iowa, have around 100 departments, many of them rural.

“There are economies of scale,” Levi said. “You can’t have a robust system if you have tiny departments.”

It’s not as if the current crisis took public health policymakers by surprise.

The trial runs for covid-19, the disease caused by the coronavirus, include the post-9/11 anthrax attacks that disrupted the postal system, the SARS outbreak of 2003 and the H1N1 flu pandemic of 2009-2010.

“We all knew it was coming; we just didn’t know when or what microbe it would be,” said Lawrence Gostin, professor of global health law at Georgetown University’s law school, who advocates for dedicated funding on a national and global level to support occasional but expected surges in need.

“Every time we have a crisis, we always have to go to Congress,” he said. “The obvious things is to have an emergency contingency fund” that would avoid delays and political bickering.

Levi said he hopes the current crisis will hasten change in public health funding mechanisms.

“This instance is one where people are recognizing that had we been in a stronger position, we may have saved ourselves some of the disruption we are now experiencing,” he said. “This might be an important opportunity.”

Still there is a long history to overcome, experts say, not only of chronic underfunding but also of stigma attached to public health practitioners. They are often regarded as “poor docs for poor people,” Sommer said.

He used to convene meetings when he was dean at Hopkins for leaders from local health departments to share knowledge and strategies and was always impressed, he said, by the heroic commitment they showed to their communities.

“But as a big-picture guy, I left those meetings depressed,” Sommer said, “to see well-meaning people boxing the air with so few resources.

Katie Mettler contributed to this report.