In response to Joe Biden and the White House enabling ActivityPub federation via Threads, a number of people asked: "Why didn't the White House just self-host their own Mastodon server?"
Here's some very basic musings on what it would take for that to happen. and what some of the hurdles are. Don't consider it a definitive answer, but a jumping-off point.
The German government has been doing it for their various agencies for years
They saw Facebook a national security threat and Twitter getting bought by a censoring fascist was the final straw for a lot of German ministries to switch to accounts on the German government run Mastodon instance.
the EU has its own instance aswell