A Republican President was the one who created the Emancipation Proclamation, and the Republican Party is the one that ultimately freed the slaves. It doesn't matter that the party's platform is now almost the opposite of what it was back in those days; the name association is super strong and carries with it a lot of good will.
Back in the 90s, I remember watching a commercial for a Spike Lee movie, where the (black) character says something like, "I don't care who you are or what you do, but as long as you vote Republican, you're alright." If your education of political parties consists of solely pop culture, you would think the GOP supported minorities.