Loras during the Kingsguard meeting thinks that Sansa had a grudge against Margaery presumably for taking her place as Joffrey betrothed. Is he just naive, because Loras doesn’t strike me as a Arys Oakheart level idiot?
Here's the quote for context:
"No," the Knight of Flowers said, unamused. "Sansa Stark was the poisoner. You all forget, my sister was drinking from that chalice as well. Sansa Stark was the only person in the hall who had reason to want Margaery dead, as well as the king. By poisoning the wedding cup, she could hope to kill both of them. And why did she run afterward, unless she was guilty?"
Jaime VIII, ASoS
Loras makes valid points about what it looks like - Sansa lost an opportunity to be queen and then fled after the crime. Over in the Vale, Littlefinger is not exactly rushing around to clear Sansa's name. A big part of why he isn't is because it's a useful part of his ongoing plan to make Sansa appear (and feel) complicit in his various murder plots.
If you don't have the personal information behind all this, then yeah, this might look okay on paper. Loras is also accounting for why Sansa might want to kill Joffrey, after all. Joffrey for revenge, Margaery out of jealousy. It's not so out there. The only Queen of Westeros Loras has ever known, Cersei, might do the same.
But as for why Loras misjudges this matter... I would say that Loras is a highly privileged seventeen-year-old who spends just about all his time with highly privileged men. He knows the sort of power and luxury that's at stake, but he was not around to witness the height of Joffrey's public abuse of Sansa. He's not a part of private conversations between women about domestic violence and its effects (which you know are going on behind closed doors). He wasn't brought in on the assassination plan - he was, in fact, one of the main reasons the assassination plan was carried out as it was.
And he doesn't know Sansa herself.
Loras killed three of his fellow members of the Rainbow Guard when he discovered his boyfriend had been murdered. Loras knows irrational wrath. What he's struggling to imagine is a reaction like this:
How can I let my sister marry Joffrey? she thought, and suddenly her eyes were full of tears. "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."
Sansa II, ASoS
He doesn't have the empathy to imagine Sansa's own empathy. When his own sister's safety was apparently at stake, it's a tall order to ask him to imagine it, too. There's reasons no Tyrell should have been anywhere near the investigation of Joffrey's murder - even if they hadn't carried it out.