The conservative critique of Donald Trump is that he is not a conservative. This tautology begs the question of why it is necessary to be a conservative to secure the Republican nomination and the Presidency. Americans care little for ideology but care a great deal about putting the interests of all Americans first, so conservatism isn't a winning electoral strategy. The people are looking for a system to ensure that they are provided a level playing field and the opportunity to better their lives. The unexpected popularity of Trump and Sanders suggests that Americans think that neither conservatism nor liberalism achieves those ends. In theory, both philosophies claim to do so, but in practice, not so much. When a nationalist candidate comes along and tells Americans they are getting a raw deal from their government; it resonates, and for the socialist as well.
Both parties talk to a tough line about helping the average American, but the selective application of their principles results in benefits redounding to special interests which destroys trust in the system. For example, Republicans had the opportunity, with big majorities under George W. Bush and a reasonable excuse, the war on terror, to put an end to illegal immigration. Illegal immigration puts downward pressure on the salaries of the lower middle class. Later, when Obama, supposedly the champion of these same folks, made the problem worse; conservatives beat their chests but did nothing practical to stop his extra-legal executive orders. There could have been hard-nosed negotiations that put money for extending a wall or other effective measures to deter illegal immigration, but the conservative party just resigned itself to defeat. Meanwhile, abuse of the H1B visa program by employers such as Disney and big tech firms goes uninvestigated. Employees, that is average Americans, lack the ability to easily move between jobs, which is well documented. Allowing foreigners to compete for jobs inside this country, either because of illegal immigration or visa abuse is an unfair tilt of power to employers; but the conservative party cares not.
Meanwhile, Republicans seem willing to push for policies that help large corporations and Wall Street while claiming to do so in the name of the free market. But we end up with a battle to end just one egregious program, the Export-Import Bank, which many Republicans fought with a zeal we wanted applied in opposition to Obama's illegal amnesty programs. Further, conservatism has resulted in budgets that just continue the status quo, because it suits the big money backers of the GOP just fine. Name a single program killed by the GOP when they held legislative majority over the last 30 years? They are happy to talk a good game and collect rents from big business.
On the left, the ACA (Obamacare) was purportedly intended to help the uninsured. It's only real effect has been to provide a few new customers to insurance companies and the pharmaceutical industries, who effectively wrote much of the legislation. 80% of those who were uninsured prior to the ACA's passage remain uninsured; 20% is usually a failing grade on any scale. It is so bad, that Bernie Sanders can truthfully run a campaign to end the problem of the uninsured. A second example: The financial crisis of 2008 swept the Democrats into power in D.C. In response, they passed the Dodd-Frank so called financial reform measure. Rather than addressing the problems causing the crisis, they essentially promise to bail out big financial institutions by enshrining the "too big to fail" doctrine into law. The bad lending and the perverse incentives will continue to enrich the banking class, while the liberals claim to be fighting Wall Street for the common man.
But enough of the failures of liberalism as practiced by the modern day Democratic party. The second reason that nationalism wins is identity. When I am at work, out shopping or watching a football game; I think of myself as an American, a Christian, and a San Diegan. (Californian? Not so much anymore.) My identity as an American is much stronger than my merely political identity as a conservative, and I am a very political person. For the average voter, the national identity is even more dominant. Identity trumps ideology, always. I am an American long before I think about being a conservative or Republican. Further, nationalism serves as a glue that binds us together across classes. The overlooked story of the last two decades is the extent to which American elites no longer see themselves as Americans per se, but as part of a global elite. Zuckerberg of Facebook is seen in Germany undermining nationalism there, by suppressing anti-immigrant sentiment. The average person sees this and sees a political system where the establishment of both parties is in league with internationalists to the detriment of their own interests. How else to combat the tilted playing field than to embrace that our identity as Americans and the candidate who most explicitly makes the case to work for our interests, not the interests of the elite and not the interests of the poor and oppressed around the globe. Conservatism is the answer to a situation of low trust across our society; Nationalism is a glue to engender greater trust.
The other reason for nationalism is that we are again at war with a global ideology. Communism, fascism and Radical Islamism (by which I mean the current Wahabbist strain of Islam) were and are ideologies intent on remaking the world. Fascism wasn't defeated by democracy, but by nations acting in their own self-interest; intending to maintain their own identities. Ditto for communism. The Soviet Empire crumbled from within because its constituent nations successfully achieved autonomy for their own peoples. That autonomy didn't usually take the form of democracy, but powerfully destroyed a communist empire nevertheless. Right now, Radical Islamism is attractive because the boundaries of the Middle East have not been drawn to align tribes and peoples into true nations. Nationalism will be needed to eventually defeat this form of Islam and allow Islam to recede to a religion and shed its identity as a political movement. Ultimately, we need nationalism to secure the peace, with each tribe to its own country, secure within its own borders.
P.S. Just after I published this, I saw a link to a John Derbyshire article on the meaning of nationalism that highlights and amplifies some of what I have said; alas more eloquently.