It’s not an attraction to socialism so much as an attraction to someone who will face down the powers that be. Hillary represents the Dem insiders, and Cruz right now represents the Repub insiders, albeit as their third choice. Sanders and Trump are perceived as the outsiders challenging the status quo.
Sounds about right to me. A form of “sticking it to the man”.