"What's in the refrigerator?"
YES, but, by putting 什么 up front in the sentence, your sentence is more common when there may be something unexpected in the fridge, or when your emphasis is on the location.
Outside the exercise I would say YES BUT the size and volume of the container may determine how natural it sounds without 里.
Also, if you take the containers as abstract symbols, for statistics maybe, then it is also fine to leave out 里 and thus to focus on the kinds of the object.
冰箱里有什么? My science experiment - mouldy cultures on Moo Goo Gai Pan take away.
Can someone please explain why “ 里 ” is located where it is in the sentence? Is "牛奶在冰箱里“ written correctly?
No problem in 牛奶在冰箱里.
里 is a noun here, not a preposition nor postposition. It is modified by 冰箱. 冰箱里 is a compound word “icebox's inside”.