It is clear why Cavour wanted the alliance, but what benefits would France have from allying itself to a relatively weak (as far as I know) kingdom?
An alliance with the Sardinia-Piedmont was a good way to weaken the Austro-Hungarian Empire, and to win an potentially strong ally on the Alpine south-east border of France, betting on the unification of the Italian peninsula by the kingdom of Sardinia-Piedmont.
A weak Sardinia-Piedmont Kingdom meant that France could be threatened by an invasion from the Austro-Hungarian Empire through its Alps border with then Piedmont.
In return for its support to Piedmont-Sardinia, France received a significant amount of territory: the province of Savoy and the county of Nice.
This posture appears to have been particular to Napoleon III.
Previous French rulers preferred to capture pieces of Italy, specifically Piedmont and Lombardy, even if it meant dividing the country with the Hapsburgs (e.g. giving Austria Venice, or the "two Sicilies" to Spain. These rulers included Napoleon Bonaparte, and before him, several of the Kings Louis, and King Charles VIII.
Napoleon III preferred to "rule by proxy." He felt, quite reasonably as it turned out, that France's interests would be best served by having a united, but weak Italy as a "buffer zone" against the expansion of Austria-Hungary. To him, what could be gotten for France was less important than what could be kept away from others.
Ironically, Napoleon III also supported the candidacy of Maximilian (the brother of Austria Hungary's Franz Joseph) to be Emperor of Mexico as a check against the power of the United States. But his forces were defeated by the Mexicans at Puebla, May 5, 1862, and he "pulled" his support for Maximilian after the end of the Civil War, and the re-enforcement of the Monroe Doctrine, causing him to be executed by firing squad.
Because with Sardinia-Piedmont comes the House of Savoy, a powerful political and trade dynasty with far-reaching influence throughout Europe.