You’re right; it offers insignificant people an opportunity to belong to something (that accepts all losers). It gives meaning (in their minds) to meaningless people, usually with nothing to lose.
Have you ever read The True Believer by Eric Hoffer? The premise of the book is that radical politics and fanatical religious belief gives nonentities a sense of identity and value, and gives people with no sense of direction in their lives a (fake) reason to live.