He did have to leave his independent status and join the Democratic party in order to participate in the primaries. But that was just a formality; he filled out a form.
Some people did vote for him. Just nowhere near a majority. A lot of people resented that, and stayed home rather than vote for the primary winner. So she lost, and the rest is very literally history.
Outsiders can and do win in the primaries. Trump is the most prominent example. He was not a familiar regular, and nobody in the party leadership wanted him.
He won the primary, and went on to win the Presidency. The party leadership came around to support him, and the new leadership is vetted by him rather than the other way around.