It's a product of the scoring system.
Even though Hendricks won rounds 2 and 4 in a big way, did more damage and no doubt won the fight if it was judged overall, GSP out pointed him in rounds 3 and 5.
That meant it came down to round 1, which was probably the closest round. 2 judges scored it for GSP.
I scored round 1 for Hendricks myself, but I'm not too surprised. Takedowns were one a piece. GSP had dominant position for longer. Knees to the thigh generally don't score highly, and neither do elbows from a fighter pressed up against the cage (even though they cut GSP, they tend to be scored like strikes from the bottom). Compare that to GSP's jabs and a few (most partially blocked) head kicks.
I thought the weirdest thing was the post fight interview. GSP was really odd. Memory loss? Almost didn't say anything, then announces he's hanging up his gloves temporarily for unspecified personal reasons?
I didn't think Hendricks hit him that hard...