Anything after "?" is a query parameter that the server can read and then apply additional logic to for a response. In this case, they have code that responds to new logo and returns the new logo instead of the previous one.
It's actually not querying anything, since it works for any query you pass. What happens is that you're bypassing cache because you're loading a different page, as explained by sirn above.
https://www.google.com/favicon.ico?anyquery