Say if you have a constant flow coming in, and as soon as the pump detects the level, it turns on. When the level drops, it turns off. It's going to flip back and forth wildly.
So, what you tell the switch via a float mechanism is "If it touches this value, turn on or stay on" and "If it touches this different value, turn off stay off" and the values actually overlap each other. There will be values that are both on and off values. Such as, if it turns on at 4 liters, but turns off at 2 liters, 3 liters can be either an 'on' or 'off' value depending on the last value of the switch itself. It will pass 3 when filling, and pass 3 again when emptying.
Edit: also, this type of logic allows you to store two or more pieces of information on a digital bit, such as detecting a low to high input that indicates one thing, and a specific voltage range that indicates something else.