The answer is generational wealth. It’s a bit of a hard concept to understand and one I didn’t pay attention to until I started to fill in the gaps in my knowledge about how and why people do things.
“Why the West” is really asking “Why did Europe pull ahead of the rest of the world technologically?” Lots of ink has been spilled over this question, but my answer to this lies in the unique geography of the continent. It’s really small, has lots of natural barriers, leading to lots of ethnic separators, but just enough openness to promote a lot of war.
War was important, it’s a singular driver of human effort. Humans will do anything to survive, and Europe was in a constant state of warfare for hundreds of years. Military technology improved by leaps and bounds over the time the Roman Empire fell and the rise of colonialism.
Other parts of the world had various aspects that made Europe so important, but only Europe had all of them. China was too open geographically, it’s easier for one polity to exist there than dozens. One polity means more peace. More peace means less military technology. Africa is just too big, so was the Americas. South America saw the rise of an advanced civilization, but it was hamstrung by the lack of horses.
After the Napoleanic wars Europe tired of fighting wars on its own soil, so they took their bloodlust elsewhere. Naval empires were built and this is where generational wealth starts to come into play.
You see, generational wealth is when one group of people coerce labor and goods and services from another group of people, for generations. No longer do you have to buy the things you want from your compatriots at truly market rates. You can just get someone who is in less of a position to argue with you to make it for you.
For awhile this was done through slavery. Vast amounts of wealth flowed across the oceans. All of it represented transfers of things that Europeans wanted enough to coerce other people to give it to them. By the time slavery became politically unfeasible, a racial class divide had formed.
In most societies up until the late colonial period, the upper and the lower classes had the same skin tone, were part of the same ethnicity, shared the same cultural heritage. One person just got lucky enough to get born into a family that managed to acquire wealth and hold on to it, and the other didn’t.
At the end of the colonial period, this kind of intra-ethnic inequality flattened out, to be replaced by enormous inter-ethnic divides. This is most famously seen in the United States, where black people collectively share much much less wealth than white peoples. But it’s all over Europe. The developing world looks a lot like pre-colonial Europe where the largest class divides are intra-ethnic.
This sort of thing is exacerbated by the basic geopolitical fact that people want to deal with, interact with, share with people that are more like them. It’s just really really hard to build wealth, and white Westerners have been wealthy for so long they’ve forgotten what it’s like to not be wealthy. Even the poor are rich here, comparatively.