It's due to social class. Within our society, Caucasians are the pinnacle of socioeconomic class, then south asians and east asians, then middle easterners and arabs, and at the bottom you have Blacks (sorry). That's how society is built so that is how we view things via indoctrination.
And even among whites, Swedes look better than Spaniards, and among Blacks, west Africans look better than east Africans. Perceptions of social class influence sexual preference in adulthood.
Class perception may play a role in what many people find attractive however I believe there are various other factors some cultural and some biological that affect it too. Yes Blacks are unfortunately at the bottom of class ladder but at the same time many caucasian women find them really attractive. In fact, I have known white women that exclusively date black men. I believe raw attraction to be a result of an interplay of several factors. I am a brown man and went to a college that was over 99% white and I never felt at a disadvantage when it comes to dating. In fact, I always considered my skin as an advantage as girls found me really exotic and consequently I was able to date some really beautiful women. More so than many of my caucuasian friends. The only thing that actually hindered me sometimes was my atheism. My university is in the Bible belt and vast majority of girls were really religious. Some of them wanted me to convert to Christianity before going out on a date with me.