"¿Qué bebiste en el restaurante ayer?"
Translation:What did you drink in the restaurant yesterday?
"What did you drink yesterday in the restaurant" has exact same meaning, sounds better, but was not accepted. ¿Por qué no?
Because word-order is meaningful in both English and Spanish. When you say en el restaurante ayer = in the restaurant yesterday, you make space more important than time. You are asking "What did you drink in the restaurant? Btw, I'm asking about yesterday".
On the other hand, if you say ayer en el restaurante = yesterday in the restaurant, you make time more important. You are asking "What did you drink yesterday? Btw, it was in the restaurant"