Upvote:6
France was the (potential) ally most immediately at hand. Piedmont had been allied with France (and England) in the Crimean War against Russia, and while England could not provide immediate help, France could.
With the benefit of hindsight, one could see that Prussia would have made a more reliable ally in 1866. But Prussia and Austria were allies as late as 1864, in a war against Denmark. And in fact, the fear in 1858-9 was that Prussia would interfere on the side of Austria.
Ironically, it was an assassination attempt against Napoleon III (by an Italian) that got him interested in helping Piedmont. The assassin claimed to do so, not out of hatred for Napoleon III, but out of love for Italy, and claimed that if Napoleon III helped Italy unite, all the Italians would love, rather than hate him.
Basically, Napoleon III was "willing" (if weak, and treacherous) to help Piedmont, and others were not. Considering the outcome, Cavour did not make a bad deal.