Other than directly cancelling a competing product, it's usually to acquire the staff. Bit like the football transfer market, but you can buy Marcus Rashford separately without having to buy the whole of Man U.
That's what the vesting period is for, to ensure the team sticks around for long enough that the acquirer can figure out who is most valuable and make it attractive for them to stay.
I've definitely heard stories of people who wanted to sell their stock after being acquired, couldn't because of vesting/lockup, and were glad because it went up a lot in the meantime.
It's just an acquihire. On the startup's side, the company has failed and they would be shutting it down regardless; this way they've found jobs for their employees and saved face. On the acquirer's side, they've recruited a team that they think is worth hiring with a lower cost of sourcing them.
The acquirer usually isn't paying that much in a case like this. Unlike what some other comments in this thread say (I assume from people new to the industry), nobody's getting rich.