it's an awkward sentence you are right, but it makes sense, is grammatically correct and all parts are necessary.
the writer uses "must have" to express the fact that he doesn't know what she was thinking, and is only guessing.
Why did she grin in that way? She "must have" done it deliberately because she wanted to look wicked. Maybe teresa was flirting, or maybe she wanted people to see that she was planning something,