Hello Shefali, (Beautiful name by the way). Rutherford B. Hayes removed the federal troops because that was the bargain that allowed him to become President. Democrats (then the bad guys) were within one Electoral vote of claiming victory with two disputed states. They won the Popular vote and looked like they would win. In a smoke-filled room, it was agreed that the Republican would be declared the winner provided he remove the federal troops.
That wasn’t all, the following year Hayes gave us the Posse Comitatus Act whose purpose was to ensure that federal troops never returned to the South in the protection of the former slaves.
You’re asking good questions including why black people continue to vote Democrat. They used to vote Republican in the same manner until the mid-1960s when Democrats passed Civil Rights and Voting Rights legislation and most of the pissed off racist Democrats fled to the Republican Party. Now, there is no reason to respond to weak Republican appeals to black voters while they still implement voter suppression and the Southern Strategy with the full support of the RNC (which was just relieved from a Consent Decree for suppressing votes) and all the allegedly moderate Republicans. They can’t suppress my vote and expect to receive it as well.
I hope you stay in touch and keep asking questions. I’m always looking for food for thought that might inspire new stories.