IR Scoring is a big black box - so I can understand how you're getting confused. A few things to consider:
1) Experimental questions (about 2-4 out of the 12 questions DON'T COUNT toward IR Scoring)
2) Difficulty Level
It's quite possible that out of the 12 questions, only 10 of them actually counted. The 2 that you got wrong may have been experimental.
So then you actually got 9 out of 10 (that actually counted) correct. And well, maybe that question you got wrong was a really difficult question.
So, the 9 out of 10 may scale down to a raw score of 8.
On the other hand, if the question you got wrong was EASY, then that 9 out of 10 might scale down to a 7.
There are a lot of moving parts and the actual algorithm is not revealed by the GMAT folks, but hopefully this will help you understand why/how you got a perfect score of 8 despite getting 3 out of 12 questions wrong.
... and more
What's Inside GMAT Pill?
Zeke Lee, GMAT Pill Study Method (Study Less. Score More.)
GMAT Pill Reviews | GMAT PILL Free Practice Test