You should clean out the interior of your refrigerator with a mild solution of bleach and soap. You should only need to do this before you leave for a long time.
When you are using the fridge, unless you are moving around like a lab technician, little bits of food and fluids (like milk, e.g.) will drip and fall into the fridge.
When the fridge is running, these small amounts of material do not serve as "food" for airborne funguses and bacteria, because the cold environment and positive airflow keep those things from entering the interior of the fridge.
But when you turn it off, it's just a box, with tiny bits of food and dried fluid in it. Over time, the bacterial/fungus life around your fridge will creep in, and use that material to grow and live.
In the case of the fungus (which is essentially like plants), it will settle in, and grow, sort of like moss.
In the case of the bacteria (which are kind of like animals), they will eat the stuff, and then run out of food, and die -- leaving a stink.
When you leave on long deployment:
- Turn off the fridge
- Remove all the food/contents
- Wipe the interior down with a bleach/water/soapy sponge
- Wipe it down AGAIN with water so you don't leave a soap residue
- Leave the door open if you can
- Maybe consider leaving an open box of Arm & Hammer baking soda in there to fight odors, especially if you must leave it closed
It's a little hassle on the way out to avoid a LOT of hassle on your return.