We never know for sure exactly what transpired between Atticus and Alexandra that eventually led to her coming to live in Maycomb. It is clear that Alexandra believes that both of the children need some female guidance and that Scout particularly needs to begin acting more like a little lady. It is also no coincidence that Alexandra appears shortly before Atticus returns from Montgomery and begins preparations for the Tom Robinson trial. It's a surprise to Scout, however, who believes that Aunty has just come for a visit. According to Alexandra,
"... your father and I decided it was time I came and stayed with you for a while."
"For a while" in Maycomb meant anything from three days to thirty years. (Chapter 13)
When Atticus personally broke the news to his children, he explained that
"We felt it was time you children needed--well, it's like this, Scout... Your aunt's doing me a favor as well as you all. I can't stay here all day with you, and the summer's going to be a hot one." (Chapter 13)
When Atticus asked her if how she felt about it, Scout lied and said "I would like it very much." Scout didn't understand Atticus's explanation but
... I had an idea, however, that Aunt Alexandra's appearance on the scene was not so much Atticus's doing as hers. (Chapter 13)
Although Atticus may have reluctantly agreed to let his sister come to live with him, he did manage to establish that he was the head of the household, firmly rejecting her idea that they fire Calpurnia. As for Alexandra, her stay in Maycomb apparently proved to be a fairly long one.
She comes to live with Atticus because she doesn’t like the way Atticus is raising his children.