It opens and closes as the engine temp changes due to speed, load and ambient temp!
As the temp sender is just behind the stat it picks up when the stat opens and allows cooler coolant to pass through. On a cold day it closes more often as the cooling is more efficient than on a hot day when the stat will likely remain open:
Inside your car's engine, thousands of controlled explosions called combustion events caused by igniting fuel/air mixture inside the engine generate heat. If this heat is not controlled the engine will overheat and internal damage can occur. These high temperatures are controlled with the help of the cooling system. A cooling system consists of a water pump, thermostat, radiator hose, hose clamps, radiator, radiator cap and coolant. The thermostat is designed to control the flow of coolant through the cooling system while the engine is warming up to operating temperature. An engine needs to operate at a particular heat range to be efficient. Once the engine is warm the thermostat will open to allow coolant flow to maintain a particular temperature. Most thermostats are designed to open at about 195° F but other temperatures are available for a variety of applications. A thermostat consists of a main housing, a plunger style of valve with return spring and a temperature sensitive wax filled plunger that acts as the sensing and activating device. A thermostat maintains engine temperature as is opens and closes throughout the engine operation.
If the temp sender was at the point where coolant leaves the engine to be called in the rad then the gauge would not pick up on the stat opening and closing.
Just relate this to a bath of hot water - you have a thermometer in the water under the cold tap, when you turn the cold tap on what will happen to the thermometer even if you are trying to circulate the water. If the thermometer is at the other end of the bath then the changes in readings on the thermometer will be not as pronounced.
It really is quite simple.