Twitter isn't owned by the president or the federal government; Trump has many other legally established venues for his public announcements (whitehouse.gov, for instance). If he prefers to use a private company to speak to the public, he has to abide by its rules - in that regard, he is no different from any other Twitter customer.