This is probably a nicer explanation: MQTT 5.0 Features | Retain Message | by EMQ Technologies | Medium