The real-life trial and events surrounding Grace Marks and the murders she was convicted for was such a mystery and fascination to many people during its day, and was left relatively unexplained and unsolved. Records of the events, along with other people's speculations, all hypothosized different possible scenarios, and no one really knew the truth of what happened. Margaret Atwood proposes one possible solution at the end of her book: multiple personalities, or, as it is is called now, Dissociative Identity Disorder. In this disorder, a person develops multiple personalities, and often, they are completely unaware of it. And depending on the situation that the person is facing, a different personality might surface. So, if they are in a stressful situation, their more aggressive and controlling side might take over. If they are in a situation where they are threatened, a hostile, strong personality might take over, one that is better equipped to protect them from harm. It is a very, very rare disorder, but it is real, and documented, and usually caused by trauma or intense stress.
Atwood seems to be implying that Grace had an alternate personality in the form of Mary, and it was Mary that took over for all of the unacceptable things that occurred; it was Mary who teased and flirted with the boys, possibly sleeping with them; it was Mary who committed the murders and manipulated McDermott into doing things. That is the implication Atwood makes. Now, whether or not Grace is faking Mary's personality, or if it is genuine is unclear. Grace is always weighing what she will say to the various doctors that she encounters; this indicates an admission of guilt perhaps. Or, it just indicates that she knows that what she says will determine her future. So, that is left up to the reader to argue.
The ending is believable if you give credence to Dissociative Identity Disorder, and the fact that one personality can take over and cause you to commit horrific crimes. It is satisfying in a certain fantastical way--it is a very dramatic, intense, and glamorized way to end the tale of Grace Marks. If the purpose of the book was to solve the mystery, Atwood did provide a possible explanation. If the purpose was to entertain, I think it certainly did that. If the purpose was to perplex and spark discussion and thoughts, I think it works on that level too.
I hope that those thoughts helped a bit; good luck!