That is a *very* good question!
I would say the answer is that in the past, it has not mattered. Electric rates have been low in the past and it would have been silly to bother.
But now the electric and energy rates are quite high, so time to think about these things...
This is something I have thought about and would like to incorporate into my kitchen design when I remodel it.
Basically it would be with the design of the house, not the refrigerator. I would place the refrigerator on an outside wall. Perhaps build a "compartment" for it sort of like a closet. Just the front doors showing through. Then upper and lower vents on the outside wall so the cold outside air could circulate around the refrigerator in the winter. And fine mesh screen over these vents so bugs can't crawl in. Maybe be able to close these vents if it gets too cold outside so the refrigerator portion will not go below freezing.
I do have my freezer in the garage and it is quite cold out there in the winter. It runs very little.
Note that if you have electric heating, it would be pointless to do this. The heat from the refrigerator would help to heat the house. So in that case no point in venting it to the outside.
And in the summer it would get tricky. I have not thought about this. But you could be paying to cool the house. And there might be times when it is very hot outside. Other times it would be cooler outside. Perhaps use the cool inside air as an intake for the coils of the refrigerator, but vent the warm output air to the outside? But if cooler outside at night than in the house, switch to using outside air.
And use the cool inside air to surround the refrigerator if that is cooler than outside.