How much time it took Mance to unite clans, according to the books from 10 to 12 years.
In the very first chapter of the AGOT, Bran.
It was the ninth year of summer, and the seventh of Bran’s life.
The man had been taken outside a small holdfast in the hills. Robb
thought he was a wildling, his sword sworn to Mance Rayder, the
Bran was born in 290 AC, so the chapter takes place in 297-298 AC. By this time Mance is already known as King beyong the Wall.
ASOS, chapter 7, Jon.
Mance says that he has seen Jon twice. First time -
You were just a boy, and I was all in black, one of a dozen riding
escort to old Lord Commander Qorgyle when he came down to see your
father at Winterfell. I was walking the wall around the yard when I
came on you and your brother Robb. It had snowed the night before, and
the two of you had built a great mountain above the gate and were
waiting for someone likely to pass underneath.
Jon was born in 283 AC. Jon playing in the yard and building mountain of snow, well that makes him at least 3 years old (even in fantasy world a boy has to be old enough for certain things). So this event takes place in 286-287.
Now simple math, Mance deserted in 286 and in 298 he's King beyond the Wall, so at worst it took 12 years to unite clans. Mance deserted in 287 and in 297 he's King beyond the Wall, so at best it took 10 years to unite clans.
Motives and why did Mance united clans, well that's the hardest part of your question. We don't have Mances pov in the books and I don't recall him saying what his motives are. So we have to rely on other characters.
AGOT, chapter 57, Bran.
Bran has conversation with Osha
“Are there truly giants beyond the Wall?” he asked Osha, uncertainly.
“Giants and worse than giants, Lordling. I tried to tell your brother
when he asked his questions, him and your maester and that smiley boy
Greyjoy. The cold winds are rising, and men go out from their fires
and never come back … or if they do, they’re not men no more, but only
wights, with blue eyes and cold black hands. Why do you think I run
south with Stiv and Hali and the rest of them fools? Mance thinks
he’ll fight, the brave sweet stubborn man, like the white walkers were
no more than rangers, but what does he know? He can call himself
King-beyond-the-Wall all he likes, but he’s still just another old
black crow who flew down from the Shadow Tower. He’s never tasted
winter. I was born up there, child, like my mother and her mother
before her and her mother before her, born of the Free Folk. We
Actually this passage once more confirms that Mance has not spent 20 years uniting clans, as Osha points out - He’s never tasted winter. Mance has not spent winter beyond the wall. And if we believe in Oshas words, Mance is going to fight Others. So that's your motive, if you have to fight others and wights you need an army. As to how Mance knew about others, well he might not but as Osha says We (Free Folk) remember.
As to why free folk attacked the Wall, I do recall Jon saying that free folk was not attacking the wall because of feud with Night's Watch, but because they were fleeing from something more terrible than swords and arrows of Night's Watch. And Mance was looking for safe house for his wife and his unborn child. I'll look in the books for direct quote and will include it later.
Maybe 20 years is a TV canon, but that doesn't comply with the books.
Besides, Tormund is not a reliable character. If Tormund is trusted then we have to believe that he has bedded bear and the bear has bitten half of his member but his member is still thrice in size compared to Mance's. Also he has spent some time in the belly of a sleeping giant and when the same giant woke up, took Tormund for her babe and suckled him for 3 moons turn. (this last paragraph is not part of the answer, but couldn't resist myself of not pointing out Tormund's exploits)