The U.S. government reported that the manufacturing sector added 37,000 jobs during July, pushing the industry to the best annual job gain in more than 20 years.

Over the past year through July, U.S. manufacturing added 327,000 jobs, the most of any 12-month period since April 1995.

The sector received a boost from President Donald Trump's corporate tax cut and a lift in overall economic activity.

"With 157,000 jobs created in July, including 37,000 in manufacturing, this report shows tax reform and regulatory relief are continuing to deliver for America's manufacturing workers," Carolyn Lee, executive director of the National Association of Manufacturers' Manufacturing Institute, said in an emailed statement.

"Congress and the administration have taken important steps in recent weeks to tackle this challenge, but this jobs report is a reminder that more work needs to be done through partnerships with the private sector to solve the workforce crisis facing manufacturing in the United States," she added.

Indeed, economic data shows that U.S. manufacturers are producing near record levels.

Last year, U.S. manufacturers produced about $6 trillion in gross output, according to the Bureau of Economic Analysis. The biggest categories were food, beverages and tobacco products ($1 trillion), chemical products ($837 billion) and motor vehicles and parts ($701 billion).

But while job growth has been strong lately, the total number of manufacturing employees is well off the sector's heyday, a fraction of what it once was. Stephen Roach, an economics professor at Yale University and former chief economist at Morgan Stanley, told CNBC that despite the political focus on manufacturing, its role in the American economy continues to wane.

Manufacturing payrolls, Roach said, comprise only 8.5 percent of the U.S. total, down from above 30 percent in decades past.

"The manufacturing jobs numbers continue to show solid momentum, but this is not the sector that will make a major difference for American workers," Roach said. "There's been a dramatic shift due to automation, machine productivity and the shifting of jobs to China and other countries with lower input costs."

"It's a political ploy by the President who wants to 'Make American Great Again,'" he added. "This is politics, not realistic assessment of economic outcomes."

While manufacturing increased in absolute terms, it still represents a smaller share of the economy than it used to. The sector represented 11.6 percent of U.S. GDP in 2017, down from 12.3 percent in 2011 and 28.1 percent in 1953. Manufacturing jobs peaked in 1979 at 19.4 million, according to the Bureau of Labor Statistics.

The apparent paradox between record levels of output and a decline in workers shows that American manufacturers have become far more productive over the years — said differently, they can produce more or higher-value goods with less labor.

The Labor Department's index of labor productivity for manufacturing is more than double what it was at the beginning of 1987, likely reflecting an economy-wide investment in machinery, a more educated workforce and a rebirth in technology and big data, helping companies improve performance in a variety of tasks, ranging from assembly to tailored marketing and advertisement.

A report by the World Economic Forum and Boston Consulting released in January found that nearly 1 million Americans will see their occupations vanish entirely by 2026 and will have to attain new skills to meet the demands of the marketplace.