We all know the answer to the first question, and there are two:
Trump, an employee of NBC (by way of The Apprentice), got so much free publicity that it was impossible for any serious candidate to gain traction. The fact that Ted Cruz lasted as long as he did was a miracle.
The other is that he used that free publicity to touch on a subject Republican beltway types found abhorrent, but resonated with a huge amount of the Republican base: protectionism. It was the GOP's insistence on globalism, unfettered free trade and generous immigration, despite the suffering those policies caused in much of Red America, that gave Trump that opening.
As for how he remains in office... that's just partisan politics.
------------------------
Intuitive, as is your protectionism remark.
Few if any voters understand that post-Civil War, Republican leaders were in the
pocket of the Crony Capitalist Crowd who ferociously opposed Free Trade.
Their champion was McKinley of Ohio, who called it a death sentence for our
"infant industries" despite the reality that our Standard Oil Company and US Steel
were then the most profitable corporations in the world by miles.
McKinley's 1890 Tariff doubled the duties on all foreign imports and was the catalyst
for several serious economic recessions early in the 20th century.