If a potable water system has a backflow device, pressure-reducing valve or check valve where it enters the building, it is a closed system. Long ago, we had open systems where thermal expansion simply pushed water back into the municipal water system and we were blissfully unaware of thermal expansion pressure issues. Pressure-reducing valves had an internal bypass relief that allowed increased pressure caused by thermal expansion to push through the internal relief and move back into the service line.
When our local water company began installing dual-check backflow preventers, we suddenly found gas-fired water heaters developed collapsed flue tubes, which caused the byproducts of combustion to spew forth from their access doors. The hot and cold water lines were cocked at odd angles, too, looking like a bowlegged cowboy! Customers were less than thrilled when told they needed a new water heater.