I rarely watch boxing, this fight caught my interest though. What's the deal, was it as bizarre a decision as people are saying?

I don't even know how the scoring system works. I read somewhere that the 'official statistics' had Pacquiao ahead on punches landed. And it seemed pretty clear from watching that his punches were doing more damage. So how did he lose?