Idiomatic expressions often create confusion for learners of German. Take, for example, the expressions zu Hause and nach Hause. Even though nach and zu are both dative prepositions that can mean to, in this instance zu means at. The phrase zu Hause therefore means at home, while nach Hause means moving in a direction toward home as in I’m going home. (Ich gehe nach Hause.)
You might also have noticed that the word Haus also has an -e suffix in both of these phrases. This -e is in fact a vestige of an older dative ending that used to be added to masculine and neuter singular nouns in the dative case. Now that ending is optional and in most cases sounds antiquated. However, the ending is still used in the phrases zu Hause and nach Hause.
Idiomatic expressions are many and breaking them down into their individual parts often doesn’t aid understanding whatsoever. It is best to learn them as fixed phrases.