J.M. Berger has written a semi-comprehensive piece on how white nationalists went from thinking Donald Trump was "secretly Jewish" to their Great White Hope. It's worth a read, but the short version is because 1.) being anti-immigrant is just that important and 2.) Trump has been very consistent in providing those white nationalists continued hints that he was on their side.
[A]s white-nationalists began to rally around Trump as its closest political ally in a generation, they began to detect what members called “wink-wink-wink” communications from the candidate. There was his retweet of bogus murder statistics that exaggerated black crime; two separate retweets of a racist Twitter feed called @WhiteGenocideTM; and the interview that sealed the deal: the moment on CNN when—just days before the Louisiana primary—Trump dodged the question of whether to repudiate the endorsement of former Ku Klux Klan leader David Duke, which one commenter on the white nationalist site Stormfront called “the best political thing I have seen in my life.”
The rest is worth a read as well. We still don't know the answer to the most obvious questions, though: Were Trump's retweets of overt white nationalists intentional, or the result of Donald Trump not giving a damn who he's retweeting so long as it contains nice words about him? Did Donald Trump sincerely believe that when he was retweeting a picture of Hillary Clinton surrounded by money and a Jewish star it was meant to be a "sheriff's" star? And did Donald Trump Jr. give interviews to white nationalists and retweet white nationalist imagery out of similar self-absorbed gullibility, or is he supporting those forces more intentionally?
At some point, of course, it doesn't matter. If you're too stupid to check whether you're retweeting "WhiteGenocide" or can't be bothered to wonder if the "murder statistics" you're sending along to your supporters are true or bunk, you're not the stuff of public office.
That said, the campaign's reliable wink-winks to the racist right—even long after getting hammered for those links—speak for themselves. If Trump didn't intend to give white nationalists his under-the-table support, he would have stopped doing it. He didn't. He still hasn't.