Once "master" is used in combination with "slave", it refers back to slavery and leans on it, there is no doubt about it. That's the case for MIDI, for example. But in the Github case it is not related to that at all, and the change is wholly unnecessary. That doesn't make it wrong, as a sign, to change your master branch to "main" branch, of course. There is a lot of arguing in bad faith in this area. As if showing a bit of good will and following a simple name change guideline would seriously harm any of those complainers. But I agree that this change can is not really justified linguistically.
My 2 cents, for what it's worth.