Lazy comedy punches down. You find a group that it’s socially acceptable to make fun of and then you do, because you don’t need a punchline.
Go back and watch some sitcoms or comedy from the 90s when it was acceptable to punch down at homosexuals. Comedians didn’t need to write the hard part of the joke, they could just do a gay lisp and the audience was in stitches. Sitcom writers didn’t need to work hard just put a character in a situation where another character would think they are gay, audience whooping and hollering.
Were these moments funny? Not really. But at the time homosexuals were a group it was ok to make fun of so people did and audiences liked it. They liked it because implying someone was part of that group was scandalous, the members of the group could be treated with derision, and it affirmed in the audience their own goodness merely by not being a member of the group.
Blackface was working for largely the same reasons. It was acceptable to mock and denigrate black people. It requires no hard thinking or creative writing to have a character slap on some blackface and act in a stereotypical fashion. Doing so was as easy crowd pleaser because it was a joke “everyone was in on” and it made the white audience feel superior.
Telling audiences comfortable jokes that affirm that they are good people is a great way to make boatloads of money. What jokes are comfortable and what makes people feel like good people changes over time and we look back and go “cringe, why the heck did we find that funny at some point?!”