China is what happens when you enclose a really big population in a box. And this box is really comfortable; you have little incentive to go outside of it. You have the company of millions of other Chinese folk, and Chinese culture and its derivatives (to this day many of us see Korea and Japan as copies of Chinese culture) can entertain us indefinitely. The average Chinese has little incentive to run off and seek interaction with other races, other bits of culture. I suspect (but might be wrong) language barriers also play a role in this.
Even today in places outside China, you can notice how Chinese will naturally gravitate toward each other into little "bubble" communities. The fact that there are just so many of us makes this very easy. I know other cultures do this as well, but like I said, we have the population advantage.
Chinese are racist because we have very limited experience with other, non-East Asian cultures. Oftentimes you will see Chinese follow straightforward stereotypes regarding ethnicity. For example, Chinese attitudes toward blacks easily stem from what they see in the news or media (Movies, crime reports, etc.). Confirmation bias does play a bit in here: Chinese culture already has a pretty simple ideal in which darker-skinned people are unfortunately shafted and considered undesirable.
When it comes to history, Chinese people again suffer from the box-syndrome - many are proud and fervently study Chinese history, and thus barely scrape the surface of world history. My immigrant father could recite many Chinese emperors by name, but knows nothing about American, European, even Japanese history (except WW2, of course). One thing I found interesting was that my dad is totally fine describing the brutality of ancient and medieval Chinese rulers, but as we get closer to the present, the spotlight turns to Japan and then things get quieter. Even today he watches media pretty much exclusively on Chinese apps - no Youtube, etc. I can tell there's so much there for him, he has no incentive to look elsewhere.