I asked my wife the same question years ago because I kept messing up "
nach Hause" and "
zu Hause". She tried to explain it thusly: You're normally at home, so if you're away from it, you're going back (
nach) to it. Don't forget,that "
zu" doesn't just mean "
to"; the usage for pubs probably reflects a more archaic sense of closed/shut (almost like hotel stationery that says "in residence at the X Hotel") with the "moving towards" grammar tacked on later.
She ended up telling me the
Aldi joke mentioned above as a memory aid.
My hometown is near
King of Prussia, Pennsylvania, which is a town named after a tavern/roadhouse/pub.