I'm not sure about the meaning of this sentence. are laws protecting shopkeepers in the U.S. or japan? "Retailing is twice as productive in the U.S. as in Japan, where laws protect shopkeepers from discount chains." thanks.
where is a relative adverb that refers to the noun preceding it, here Japan.
You can make up a sentence that tries to refer to a noun that doesn't immediately precede the relative clause, such as
*Baseball is almost as popular in Japan as in the United States, where the game has been dominated lately by the Fukuoka SoftBank Hawks.
That sentence doesn't work because grammatically where refers to United States, but the sentence obviously intends it to refer to Japan.