By KH2? Ew. She was turned into such a Kairi replica in KH2 I couldn't stand it T_T; I prefer her CoM-Days persona by far.
Sora was angry, true, but he realized the circumstances. Even though the memories were made up, he also got to see what kind of person Namine was and decided he couldn't stay angry with her for it. Staying angry at Namine, a person he could be friends with who was forced to harm him would also mean he'd have no reason to forgive Riku since the Darkness messed him up. So I really found nothing wrong in how he forgave her. On the contrary, him even admitting to have been angry to begin with is part of why I don't mind it - it's not that they just shrugged at it and pulled a forgiving act out of nowhere - Sora was well aware of everything and he still made his decision for reasons we were shown.
And let's face it - Namine could've just as easily wiped out SDGJ's Memories of her ever being a witch, recreated some glorified life for them in Castle Oblivion and they'd have lived their lives happily ever after like that. She didn't; to top it all she also left Sora the choice of which set of Memories to keep, and the group realized well what picking their real Memories would mean about Namine.
So yeah. They actually did have a pretty good reason to thank her, if only to have a way to even REMEMBER her.
T_T;;;; *has SoNami as one of her bigger OTPs* it's just like, ugh... unlike SoKai who's so detached and barely even had the cave-wall drawing, SoNami was based on all levels. First, a member of the group; then, BFFs with both Sora and Riku, and then with just Sora. So when Sora got to be obsessed, I understood fully well why.
tl;dr not sure I'm aiming at convincing you or just displaying why I do love the girl and her pairing. Take it either which way. *wrote a lengthy essay about why Kairi and SoKai fail and Namine and SoNami don't, a couple of years back* >>;;;