Foxconn is buying political insurance by setting up shop in Wisconsin, Greg Ip told CNBC.

“Foxconn would not be putting that plant in Wisconsin if it was only choosing the most optimal location and the lowest cost. It’s nowhere near any of its sort of existing … customers or so forth,” Ip, chief economics commentator at The Wall Street Journal, said Thursday on "Power Lunch."

“Having jobs in the United States helps insulate it from the sort of protectionist pressure the U.S. administration is showing right now,” he said. “And even at that, it only makes economic sense because Wisconsin taxpayers are kicking in $5 billion.”

On Thursday, President Donald Trump was in Wisconsin for a groundbreaking ceremony and to show his support for the new Foxconn facility that will open in the state. The president said the $10 billion factory will create more than 13,000 manufacturing jobs in Wisconsin.

Foxconn, the world’s largest electronics manufacturer, is a Taiwanese company.

This week Trump openly criticized iconic motorcycle maker Harley-Davidson via Twitter after the company announced plans to move some of its production overseas in response to the E.U. retaliatory tariffs. Foxconn is located about 30 miles from Harley-Davidson’s Milwaukee plant.

TWEET

Trump’s disapproval of the company continued at Thursday’s press conference.

“Harley-Davidson, please build those beautiful motorcycles in the U.S.A., OK? Don’t get cute with us. Don’t get cute,” Trump said.

“Build them in the U.S.A. Customers won’t be happy if you don’t, I’ll tell you that," he said.

, chief investment officer at Safanad, a financial firm, said Trump is "ignorant of the facts."

"It's irresponsible of him to single [Harley-Davidson] out and attack them," he said Thursday on "Closing Bell."

Harley-Davidson could not be reached for immediate comment.

The iconic American motorcycle maker has struggled in recent years from declining sales caused by a mix of changing consumer preferences and high price points. Sales of Swedish motorcycles and less expensive Japanese bikes, however, have risen.

Last year, in an effort to boost sales, the company said it would open a factory in Thailand and continue to try to grow its international ridership.