There is one reason Twitter is not doing this, and one reason the governments can do this in the first place, and that is money. Twitter makes money off of users in other countries (its stock performance is tied to % increase of DAU). Twitter knows its service is pretty easy to replicate and is thus willing to play by these government's rules. If Twitter doesn't play by the rules, there are plenty of local players who would be very happy about that.