The early takedown attempts were a calculated risk. While JDS does have good takedown defence and can scramble up to his feet quickly, he doesn't really punish people for failed attempts. If you shoot on him and fail you're not going to eat a knee or get hit with a punch combo. Rather, he opens the range and then starts working the striking game.
Cain made the bet that he wasn't going to get creamed by knee or anything like that when going for takedowns, and he was right. He got his gameplan working and that was what won the fight for him.