That very much depends on how twitter structured their options and the details of the contract for purchase. I've seen setups where all unvested options vest immediately with a purchase and I've seen setups where the options are gone just like that. There is a whole range of options in the middle that are possible as well.
In the first scenario they only exercise if there is a sale which may or may not be on the horizon when the options plan is set up. It's a way of showing appreciation for employees since there is no guarantee after a sale that the reasons for the company having value will still be in place. If you want to keep people around after a sale it's usually a good idea to reevaluate your options strategy anyway and it's not a good look for options to just vanish after a sale. You want your people to be invested in a sale happening if that is your planned exit. This is a way to sweeten the pot for them.