They couldn't decide between Rachel or Mercedes for the part of Maria, so they called them back and made them audition again. After the second round of auditions, the casting directors decided that since they were both so good, they double cast the part, meaning they would each get a chance to play the role onstage. (BTW, after hearing Mercedes sing, Rachel walked away from Finn and told him that Mercedes sang it better)
Mercedes decided if she had to share the role with Rachel, she wouldn't do it at all.
Rachel, before learning about the casting decision, was sure Mercedes was going to get it, so she went to Coach Bieste and told her she wanted to run for senior class president against Kurt and Britney.
After Mercedes walked out on Glee Boot Camp, Mr Shuester told her she was out of the Glee Club, so after that, and giving up the role of Maria, went to Shelby Corcoran and decided to join HER show choir.
And that's what you missed on Glee...