There's nothing like receiving an unexpected blast of cold or hot water while showering to carve a knick into your otherwise domestically blissful household! The reason this happens is because of a pressure imbalance in the plumbing system that can be corrected with a mechanical solution called a pressure balance value.
When you step into the shower and adjust the hot and cold water mix, you have established a balance between those two supply lines that deliver just the right amount of warm water. However, when the absent minded spouse flushes away, the additional demand for cold water to fill the toilet means less water is available for your original mix. Hence, the balance of hot and cold water supply changes and you get scalded in the process! The same thing could happen when the dishwasher or clothes washer starts to fill after you've set your shower in motion. In that case, you'd be blasted by chilly cold water as the hot water flow is shared among those other two appliances.
A pressure balance valve maintains the balance between hot and cold water, regardless of the amount of water available at any one time. If you had a pressure balance valve in your shower and the toilet was flushed or the dishwasher kicked on, the flow of the water would be reduced but the temperature would remain consistent. These valves also have an anti-scald feature which allows you to set the maximum temperature, adding an additional layer of safety for both kids and adults.