Sustainably? They don’t (mostly). Most are either pet projects, paid for out of pocket by the instance owner or run off donations. Neither are particularly sustainable long term, with rare exceptions like sdf.org.
The SDF runs just about every federated service you can think of, and has done so since the 1980s, run almost entirely off donations. Started as a dialup BBS (still active).