Metonymy
Why do we say 'have a drink' without eating the glass?
It's a metonymy. We name one thing by another closely linked to it: the glass for the drink it contains. You understand immediately that it's the liquid, not the object. This figure makes language faster and more natural.