Some founders start their companies to be flipped. Some start with the intention of going for the long-game but find the reality of competing in the market exhausting and emotionally draining. Some realize that they won't be able to capture the market share they want. Other times internal strife or conflicts with investors get in the way.
There are many motivations for acquisition and the realities of the difficulties of startups make any good offer very appealing. It's very hard to resist.