Thank you for pointing this out. This is the main reason why so many engineers I know got basically nothing when their company was acquired after slaving away for years.
If you join a startup, you should either do it for the experience (lots of responsibility, wearing many hats), or as a founder. Anything less is a recipe for disappointment.