Gus played a brilliant gameplan. He's a better boxer than JBJ, but not better at anything else. He obviously watched a lot of tape on JBJ and threw everything at him to keep as much or the fight on the feet and to make sure that kicks weren't a big factor. In order to do that he:
1) Went for the occasional takedown, meaning that JBJ had to keep his hands lower than ideal, opening up boxing, and also that JBJ couldn't close the distance too much and dominate in the clinch without risking being on his back.
2) Caught kicks. Gustaffson aggressively caught kicks preventing JBJ from getting too fancy and aggressive with game-changing kicks that would allow him to dominate from distance
3) Used every technique, from the sprawl to the turn-around and run, to prevent JBJ from putting him on his back (which worked until the 5th round).
4) Closed distance on all spinning manoevres. There are only two ways to avoid a spinning back-fist, back-elbow, or back-kick: move away or move in. Most people move away, which allows Jones to throw as many as he likes with no risk. Gustaffson moved in and clinched, meaning they became high-risk for Jones. He caught him on one moving in, but the top of the head, as much as it bleeds, does not hurt as much as the jaw and has no chance of knocking out like the temple or chin.
tl;dr: Gustaffson went for takedowns to lower JBJ's hands and as part of a series of moves to make most of the fight a boxing match, the only place where he had the clear advantage.