You don’t have to be politically correct to know that blackface was a grotesque caricature to make black people look goofy and seem inferior to whites. Whites could laugh at the blackface character and feel smugly superior. This appeals to some really base things in human nature.
The first all-black (not blackface) Broadway musical was a rip roarer titled “In Dahomey.” It was a comedy about a con game in the voluntary repatriation business, which was big in the late 1800s. People get upset over that kind of thing today too.
And... white people COULD do that, but the question is whether they WOULD do that. It did represent an awkward era in which it would have been easily possible to get actual black people to act in character, but they weren’t widely allowed on the stage. So in that sense, racism is reflected, even though the walls to Hollywood have long fallen.