They’re convenient for many things besides canceled flights. For instance, if you have a very early flight and you don’t live close to the airport, you can stay there the night before.
They’re great for conferences where attendees are flying in from all over. A comfortable hotel with suitable meeting rooms right at or by the airport is going to be a popular choice.
Not to mention places of rendezvous with your out-of-town sweetie.
They often have nice restaurants, too, where you can dine pleasantly with aforementioned conference attendees. Or sweetie.
Many major airports are well outside city limits for the nearest city, so a civilized place to stay close by is a must. There are some cities that I have technically visited, where all I’ve actually seen is an airport hotel.