Aside from all the other (very good) answers regarding technical and corporate culture, the potential for a windfall--either monetary or career--is higher than in a company that either already has or likely never will go public or otherwise exit.
I say career because even if you don't make a lot of money, being an early technical member of a successful startup usually A) gives you a fair amount of visibility and credibility in the tech community and B) leads to a number of other job opportunities with startups with more responsibility and/or equity. Being able to execute under pressure is a valuable quality, and once founders or even VC firms know you can do it they start cherry-picking you.
Edit: should also add, don't go working for a startup just to go make money off equity. The grand majority won't make you much unless you're a very early hire; you'll probably make more over the same amount of time by investing your higher salary, ESPP, etc. at a more established company. Make sure the other factors are the "real" reason, with potential cash being a secondary one.
But I mention it because you ask why other people do it, and that's one reason why.
I say career because even if you don't make a lot of money, being an early technical member of a successful startup usually A) gives you a fair amount of visibility and credibility in the tech community and B) leads to a number of other job opportunities with startups with more responsibility and/or equity. Being able to execute under pressure is a valuable quality, and once founders or even VC firms know you can do it they start cherry-picking you.
Edit: should also add, don't go working for a startup just to go make money off equity. The grand majority won't make you much unless you're a very early hire; you'll probably make more over the same amount of time by investing your higher salary, ESPP, etc. at a more established company. Make sure the other factors are the "real" reason, with potential cash being a secondary one.
But I mention it because you ask why other people do it, and that's one reason why.