What makes you think that Margaery knew the Purple Wedding was going to happen? I always thought it was an Olenna-only plan (+ LF obvs)?
Margaery was right there when Sansa corroborated Littlefinger’s stories about Joffrey, urging her on and understanding the consequences of what she heard:
“Joffrey,” Sansa said. “Joffrey did that. He promised me he would be merciful, and cut my father’s head off. He said that was mercy, and he took me up on the walls and made me look at it. The head. He wanted me to weep, but…” She stopped abruptly, and covered her mouth. I’ve said too much, oh gods be good, they’ll know, they’ll hear, someone will tell on me.
“Go on.” It was Margaery who urged. Joffrey’s own queen-to-be. Sansa did not know how much she had heard.
Sansa felt as though her heart had lodged in her throat. The Queen of Thorns was so close she could smell the old woman’s sour breath. Her gaunt thin fingers were pinching her wrist. To her other side, Margaery was listening as well. A shiver went through her. “A monster,” she whispered, so tremulously she could scarcely hear her own voice. “Joffrey is a monster. He lied about the butcher’s boy and made Father kill my wolf. When I displease him, he has the Kingsguard beat me. He’s evil and cruel, my lady, it’s so. And the queen as well.”
Lady Olenna Tyrell and her granddaughter exchanged a look. “Ah,” said the old woman, “that’s a pity.”
“Margaery, please,” she said, “you mustn’t.” It was hard to get the words out. “You mustn’t marry him. He’s not like he seems, he’s not. He’ll hurt you.”
“I shouldn’t think so.” Margaery smiled confidently. “It’s brave of you to warn me, but you need not fear. Joff’s spoiled and vain and I don’t doubt that he’s as cruel as you say, but Father forced him to name Loras to his Kingsguard before he would agree to the match. I shall have the finest knight in the Seven Kingdoms protecting me night and day, as Prince Aemon protected Naerys. So our little lion had best behave, hadn’t he?”
Now, of course, Marge isn’t actually that naive; she’s framing the situation in terms of a literal knight in shining armor because she knows that’s a framework Sansa will accept. In truth, she knows Joff won’t survive their wedding day. After all, as Mace notes, Margaery was drinking from that chalice, too. She had to know about the poison, or she wouldn’t know when to stop doing so, and Olenna’s not risking her prize pupil’s life.
The High Septon knelt beside him. “Father Above, judge our good King Joffrey justly,” he intoned, beginning the prayer for the dead. Margaery Tyrell began to sob, and Tyrion heard her mother Lady Alerie saying, “He choked, sweetling. He choked on the pie. It was naught to do with you. He choked. We all saw.”