This is an interesting topic, and a quite complicated one.
In the first place, look at what kind of people made up Hollywood and the Film industry.
From the beginning, at the production level, there were many Jewish people and also immigrants with a European Background, often Russian, Polish, Eastern European. There were also Australians, Canadians and British there from the beginning. Also Asians, Indians (from India) and South Americans.
All these mixed groups co-existed at all levels in the industry - Actors, Writers, Agents, Stuntmen - you name it.
There were also Negroes involved behind the scenes from the beginning.
So why would these people have initiated or carried out Racist policies?
We need to remember that Film was always suspect as a medium to powerful conservative bodies that presumed to speak for, 'The people'
The content of films was restricted by what was known as the 'Hays Code' -
http://www.filmreference.com/encyclopedia/Independent-Film-Road-Movies/Race-and-Ethnicity-THE-PRODUCTION-CODE-AND-MISCEGENATION.html The Motion Picture Producers and Distributors Association (MPPA) Production Code of 1930 (enforced after 1934)
but before that
he pre-Code industry restrictions of 1927, called "The Don'ts and Be Carefuls,"
These kinds of bodies - in the US in particular, but also operating in other countries - use economic power - threat of boycott - to restrict media content.
Unfortunately, the anti-miscegenation part of the code meant that many actors of color were discriminated against even more, and Chinese-American actress Anna May Wong wasn't cast as the lead in The Good Earth because the male lead was a white actor.
In Radio and Television in the early days, this kind of censorship was imposed by advertisers who mandated what kind of content they didn't want their products associated with. This accounts for the blandness of much of US Radio and Television right up to the present day. [Until Cable and Netflix, and now, not surprisingly, it has gone in the opposite direction. Too far and too fast?
Creators often chafe against censorship and it's often interesting to see the subliminal elements in content that creators use to subvert and comment on the limitations.
https://www.menshealth.com/entertainment/a32290089/hollywood-hays-code/ As director Edward Dmytryk explained, "[The Code] had a very good effect because it made us think. If we wanted to get something across that was censorable...we had to do it deviously. We had to be clever. And it usually turned out to be much better than if we had done it straight."
It's not just in casting that there is [I would say cultural rather than racial] discrimination. The US Western is often an example of an unreal fantasy world, with only some relation to reality. They are modern fairy tales or morality tales.
The influence of the Spanish, French, Negro and Asian, also even European [Jewish and Christian] peoples in the American West has until recently been almost completely ignored, downplayed or caricatured.
As recently as The 1950s, heroic and respected Native American leading roles were played by non- Native Americans
If you think things have changed, I give you Hawaii Five 0.
Here we have a series set in Hawaii - with Hawaiian actors right? Um, no.
The original cast included - An Australian, Alex O'Loughlin, A New Yorker, Scott Caan, and cast as native Hawaiians, Korean- Born Daniel Dae Kim and Korean/Canadian Actress Grace Park. I don't see this as necessarily racism, but at worst insensitivity, Although, in this case,
when most of the cast was given a payrise, Kim and Park were not, and so they left the show.
Bear in mind, this is not confined to Hollywood. The British spy James Bond has been played by a Scott, an Australian and an Irishman. I haven't heard many loud complaints about that.
Shakespeare's
Othello the Moor has until recently, rarely been played by a Negro.
I don't think these things are evidence of deliberate racism, more of insensitivity.
While there are definitely individuals and groups that are racist, I think that 'the people' as a whole are not as racist as the media and 'informed opinion' would like to have us think.
Today, there are few families that, through marriage and relationships, are not composed of a mixture of people of racial and ethnic backgrounds.