It's a consideration for any site on the internet.
There are lots of tiny servers which have been well-maintained for years, and big servers which have closed down. Most important thing is if closure happens, you are able to move your account and followers elsewhere.
All the servers listed at https://joinmastodon.org/servers have committed to giving warning (I think it was three months warning?) if they shut down, which gives people lots of time to move their accounts if necessary.