I think you could say that "es gibt" works for sentences where you could say "it is available" or "it exists" instead.
"Es gibt noch Kuchen." "There is still some cake [available]."
"Es gibt dort ein Restaurant." "There [exists] a restaurant there."
but not: "There exists some milk in the fridge", "There is milk available in the fridge." Well, at least you wouldn't normally say the latter; I think "available" sounds about as unnatural as "es gibt" here. (Unlike "I need something to mop this up with!" - "There are paper towels [available] in the bathroom." "Es gibt Papiertücher im Badezimmer." This works, although a simple "Im Badezimmer sind Papiertücher" would sound less formal.)
The milk in the fridge is just there. We're just talking about its location.
Es gibt keine Milch auf dem Mars. There is no milk on Mars.
Es gibt keine Milch mehr im Supermarkt. There is no milk available at the supermarket anymore.
Es gibt Milch ohne Laktose. There is (= exists) milk without lactose.
(also: Es gibt Milch zum Frühstück. We/they/... have milk for breakfast.)
Es ist Milch in der Badewanne. There is milk in the bathtub.
Es ist Milch im Kuchen. There is milk in the cake.
Es ist Milch in der Kanne. There is milk in the jug.
Da ist Milch in deinem Bart. There is milk in your beard.
Da ist Milch in meinem Bier! There is milk in my beer!
It seems like 'It is milk in the refrigerator,' should be a valid sentence. Mind, it takes some imagination to figure out how/why you would use that sentence, but 'es ist' seems like 'it is', rather than 'there is' ('there is' being a better phrase to indicate that milk exists in the refrigerator, of course. )
I think this is one of those cases where translation shouldn't be too literal, but more mindful of idiomatic phrasings. Literally, you're right that "es ist" = "it is", but when would you say "It is milk in the refridgerator" in real life? "Es ist Milch im Kühlschrank" is the usual, neutral way to say that "In case you're thirsty / you need milk to bake the cake, there is milk in the fridge" or "I enter the old abandoned house's kitchen and open the door of the fridge. There is milk in the fridge." You wouldn't say "It is..." in these situations, so I wouldn't consider it a correct translation.
Often, a literal translation gives you a valid sentence that's the wrong answer. Kinda like grammatical false cognates. Just because something makes sense when translated literally, does not mean that translation has anything remotely to do with the actual meaning of the sentence. This is one of the most confusing aspects of learning a language, but also one of the most enlightening :)