How does a "mains priority circuit work"?
I don't know but given the challenge I would do something like this:







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. A relay solution. When mains is present it supplies the fridge power and disconnects the battery.

It is more likely that they have used a solid-state solution rather than a relay but the principle will be the same.