technical details
Room IDs are purely a (permanent) identifier, they have the original server's domain added to it to avoid naming conflicts, but because rooms are decentralized and don't exist on a specific server, a client can't just take that domain and run with it - the server might not exist anymore even if the room still does.
Room aliases *can* be used because you can have multiple of them (on different domains!) pointing at the same room ID, and while a room alias will stop working when the server in question goes down, that won't affect the room *itself*, which will work fine. It's only relevant for being able to join.
matrix.to links include both the room ID and *multiple* servers that are in that room, making it more likely that after a long time, the link will still work to join the room, because at least one of the servers in the link will still be alive.
Ultimately all this is just about *joining* a room; once you've joined, your homeserver is federating with the room, and it will continue working forever, no matter what happens to any other server.