Why didn't Japan learn all Chinese characters directly when learning the Tang Dynasty?

At first it was really Chinese and Chinese characters. Look at the early books in Heian period, almost all of them are written in Chinese characters.

In the early days, Japan completely copied the Tang Dynasty, with little modification. Later, various ills appeared in the Tang Dynasty, and these ills were gradually reflected in Japan. So at that time, Japan began to ponder how to separate itself from China and produce its own culture, and gradually replaced Chinese characters with pseudonyms.