I've always thought of it in terms of asymmetric risk – something Thiel seems to have a preternatural intuition for. In other words, what he stood to gain with a Trump win far outweighed what he stood to lose with a Trump loss. Most business leaders were throwing in with Clinton. If Thiel had done the same, and Clinton won, he'd be one voice in a crowded field. By being one of the few to publicly back Trump, he all but guaranteed a prime seat at the table. This is exactly what played out post-election, with Thiel ushering in tech leaders in the lobby of Trump Tower.
Had Trump lost, Thiel would have probably diminished his standing with the Clinton administration significantly. But, due to the crowded field, it would have been a small standing to begin with.
And here's the crux: Thiel has held controversial opinions for a while. He probably figured his association with Trump wouldn't really move the dial on his likability much, and he seems to enjoy being contrarian anyway.
So, anyway, there's my theory. Risk asymmetry. A lot to gain in the event of a Trump win, little to lose in the event of a Trump loss.