Explanation: Because, A vacuum has no particles of gas in it, but there is still gravity it just has nothing to act upon.
Philisophically, it is much like the tree falling in the woods with no one there to hear it. That is to say the gravity only exists if it can be perceived by one of the senses.