Smells of course are caused by volatile compounds which stimulate receptors in our nose. There is a large variety of such compounds with a great diversity of molecular structures. But many of the smells encountered in the fridge are due to volatile fatty acids. For example, when butter goes rancid, it releases butyric acid, a particularly foul smell. As everyone knows, acids can be neutralized by bases. Baking soda, or sodium bicarbonate, is a base. It reacts with butyric acid to form sodium butyrate which has no smell because it is not volatile.
Not all smells in a refrigerator originate from food. Nasty volatile compounds can be produced by a complex mix of bacteria and household mildew which can set up shop in the fridge. These produce a variety of acids with disturbing smells. Pseudomonas bacteria can produce a foul smell and are the likely culprits in a freezer, or on smelly dishcloths and old towels. In the fridge they coexist with microbes that inhibit the bacteria or break down the smell, but these microbes cannot live in the freezer. So in the freezer they have less competition and can multiply and produce a smell. Baking soda can help but there must be a large available surface area. Opening just one little corner of the box does no good. Spreading the baking soda in a plate is the best way to go. If this doesn’t solve the smell problem, washing with diluted bleach followed by hydrogen peroxide to get rid of the chlorine smell is the next step. Then follow with a bicarbonate solution rinse to change the residual smelly volatile fatty acids to sodium salts. Activated carbon deodorizers are also available for fridges. You just plop these in and they adsorb all kinds of volatile compounds.
What can you do with the used baking soda? I wouldn’t suggest using it in baking because any acid present will liberate the smells. Give it to the kids to build a volcano by reacting it with vinegar. After all, you expect volcanoes to be smelly.