It's the same as the expression "you don't know what you have until it's gone".
It explains how a person can take something for granted and does not realise its true value until it is gone.
The same goes for your analogy, although it is a bit of a strange/uncommon one.