Sentence Structure Confusion

From my understanding, the typical sentence structure in Mandarin goes something like this → WHO, WHEN, WHERE, HOW, WHAT.

So in a sentence like ‘Yesterday, the book was on the table’, would translate essentially to ‘THE BOOK, YESTERDAY, AT TABLE, ON’ So this one seems to fit the structure.

However, I can’t make it work in the following. Why is it different?

If this sentence is ‘Where do you live in Shanghai now?’, this translates essentially to ‘AT SHANGHAI, YOU, NOW, LIVE, WHERE’. This seems to be putting it into a structure → WHERE, WHO, WHEN, HOW, WHAT.

Why is this the case? Why does the WHERE get put to the front?

Thanks for the help.