France was motivated by the desire to: “enfeeble a hated and powerful rival”
France was the silent partner in the war. While not a participant, without France the war would almost certainly not have taken place in the same way if at all. With no war with France there would have been no British blockade and no need for impressments. This is borne out by how rapidly Britain dropped both as soon as the French threat was eliminated.
During the birth of America, France had moved from being an absolute chaotic monarchy to an absolute tyrannical dictatorship.
Louis XVl had bankrolled much of the rebellion and his armed forces supplied direct military assistance which some historians equate to the support provided by America to Europe in WWll. The fall of Louis brought the first modern political dictatorship into being with the full range of secret police, show trials and political terror which came to be copied in so many 20th century revolutionary nightmares.
Through this chaos America grew from being France's dependent client, neatly avoiding war with her under Adams to being accepted as a partner by the time of the Louisiana Purchase. By 1812 the relationship between the two countries was distant, in some respects similar to a reversal of the relationship between them after WWll.
France had lost any love she had for America, but retained a deep loathing for Britain with whom she had a long list of current quarrels to top up the huge backlog of historical ones. In this war as with the last she was motivated by the desire to: “enfeeble a hated and powerful rival”
 Chernow p 119.