The master in master branch is, I’d assume, from the idea of Master copy which refers to the original of something, eg a recording, drawing, etc. https://www.collinsdictionary.com/dictionary/english/master-copy
I’m not hugely tied to the word, and things change … So meh.
Just can’t trust anyone these days…