Once upon a time, a long time ago, there was only one brand of refrigerator that would work on 12v DC boat power. There must have been many thousands of them out there back in the day, predominately on powerboats, and a lot still exist to this day.These refrigerators have one or two compressors typically mounted on the rear of the cabinet, and these compressors require 20v-30v AC for their operation. When 115v AC mains power is available, either from shore power or a generator, the power for the compressor(s) is supplied by using a simple transformer to lower the 115v AC down to the lower AC voltage required by the compressor(s). But when the boat unplugs from the dock or the generator quits, the compressor is then powered from a built-in inverter that produces the required low voltage AC from the 12v DC supply. Due to losses inherent in inverters and the desire not to involve electronics unless absolutely necessary, these fridges would always be supplied with separate wiring for connection to both 115v AC and 12v DC, with the system automatically switching to 115v AC if it is available.Fast forward to modern times, and we are now blessed to have marine fridges utilizing the super-efficient Secop (formally Danfoss) compressors that are powered by 12v or 24v DC. Under normal circumstances, when the vessel is at the dock and plugged in to shore power, the battery charger will be on and supplying the DC power for the fridge. The batteries are not involved in this process, as the DC from the charger does not go into and out of the batteries, but is supplied directly to the fridge from the charger.
In this situation there will always be 12v or 24v DC available, but if circumstances dictate that the charger will not be left on, or that at times there will be no 12v or 24v DC available,