The directions are based on the spin of the Earth. The concepts were there before we discovered magnetism and named the poles of a magnet after the directions on our planet. The concept of the direction east as "toward the rising sun" is pretty basic and comes out of the mists of time from proto-languages before mankind invented writing.
Calling China and Japan the East is a more recent European centric terminology. Since the planet is a globe everything is east of some other place in a relative manner. However, if you look at the land masses of Earth the largest is Asia which still puts China and Japan in the east. Only if you consider the water covered portion as the most significant would you think of Japan as an island on the western side of the great Pacific Ocean. So considering Japan the East simply shows a land centric view.