I actually used to know a girl in the mid 80s who was a "junior", same name as her mother with a "junior" behind her last name. She got soooo much shit for that in high school.
From that I always assumed the whole junior / senior thing was technically genderless, but since it was used almost entirely by males it is assumed to be a masculine term. I imagine it dates back to ye olden days when eldest males of households were not only the inheritor of titles and lands, but the inheritors of family surnames. Take my own last name for example, it literally means "Son of Andrew"... so I suppose the whole junior / senior thing came into play when you had a son of Andrew named Andrew.
Edit: And if you want to really talk fucked up names, my paternal grandfather's actual legal on-his-ID first name was "Junior"... so he went by his middle name, which sadly was "Ralph".