Purpose is electricity during winter months when solar panels don't provide anything meaningful, retaining heat is just an optimization.
My parents growing up had a wood stove that pre-heated the hot water before the (gas) hot water heater. Was a nice setup though at one point it got too hot and melted a component off of the water heater.
