Thermal mass is the amount of thermal energy needed to raise a building one degree. Sometimes it's desirable: earthships have very thick walls with a lot of material, while phase-change materials store latent heat; this phase-change allows a hot wax bottle to outlast hot water as a hand-warmer.
On the other hand, the thermal mass of solid concrete releases heat after sunset and prevents Pheonix and other hot-desert cities from getting overnight relief from the heat.
Heatwaves are the number one extreme weather killer of this warming world and can occur even in "cold" climates. Shelters without climate control still provide relief from the cold by keeping out rain, snow, and wind. But this same lack of airflow compounded with solar roof heating (designs with inadequate insulation) can make them very dangerous heat-wise.
Naively I would think adding thermal mass is a bad idea for weathering heatwaves. Doing so reduces the peak temperatures but also makes for hotter nights, which can be quite dangerous. Public spaces such as malls, office workplaces, stores, cafes provide relief and also require less cooled space per person. But these options are generally infeasible at night. Also, sleeping above 30C I find very unpleasant, much more so than walking at a dry 40C (if well hydrated!).
Of course, the significant discussion of adding thermal means my reasoning must be flawed. I see two possible use-cases. The first is to have so much mass that you can store heat seasonally and get relief all summer (and winter). But this point wouldn't the "house" resemble a cave? The other use case is if the house is ventilated a lot at night to "recharge" the mass and then sealed during the day. But wouldn't the energy costs of sustaining such a wind-tunnel be considerable?
Are my seasonal energy storage and nocturnal-ventilation examples common use-cases of thermal mass? Am I overlooking any other use-cases of thermal mass in human-occupied buildings?