It's practically the same distance and I would expect it to be a lot faster than over the mountains. It also seems like a way better route to keep his army fed and strong.
To avoid the city state of Massilia, a Roman ally. For Hannibal speed was of the essence. The stratagem was that if he could take Italy, Rome would have to respond and withdraw their troops from Spain and Sicily/Corsica. Therefore being held up in a potentially long siege/having an enemy force in his flank was less appealing than crossing the Alps.
It makes more sense if you take a quick look at this picture where you can see his route.
Sources:
Hannibal." The Oxford Companion to Classical Civilization. : Oxford University Press, 2014. Oxford Reference. 2014.