Confused about payload_on/off versus state_on/off for MQTT switch

Looking at many people’s posted configurations I don’t see anyone using state_on and state_off (mainly payload_on/off), so I was confused about how these are used.

Is this for a rare case where you would turn something on, but want that state to be recorded as off?
When would someone want to use state_on or state_off in a switch configuration?

Thanks

state_on and state_off are fairly recent parameters, so you won’t see them in many configurations.

They were introduced to account for the situations where the payload for the state messages being received is different from the payload in the command messages being sent, so a fairly rare occurence.