A limit switch usually is a momentary switch wired NO or NC depending on its use. The state needs to be latched if we need to detemine what it is doing.
Take a simple water tank example, with just a Low level limit and a High Level. Now if the low limit is not made we need to start to fill, as it fills the low limit gets made, but we need to keep filling until the high limit is made. Once full, we stop filling. As it empties, the High limit stops being made but we don't refill until the low limit is also not made. We need to latch the state to determine the action to complete.
This is a simple example because we are only performing the fill, so only one step requires remembering -Set on low limit being not made, Reset on High limit being made.