Wikipedia article states that of 100k french soldiers in Britain at the time of de Gauls exile, only 7000 stayed and the rest returned to France an were summarily imprisoned. This makes no sense for them. What is going on here?
The Battle of France continued for several weeks after the Dunkirk evacuation, and most French soldiers chose to return to re-join with their army units and fight on. They were not returning to immediate imprisonment, which came later when France surrendered. The British government also sent another British Expeditionary Force to France at this time.
Edit: To elaborate further, your question only makes sense with perfect historical hindsight. Today, it does seem odd that most of the French soldiers evacuated to England returned to a country that was swiftly being overrun with Germans. However, only a few French soldiers, most notably Charles de Gaulle, correctly predicted that the defeatist leadership of France would surrender to the Nazis.
First of all, the Battle of France was still on-going. The French Army was being driven rapidly south, but at this point it was actually putting up a much better fight than it had in the first weeks of the invasion. Moreover, even if the Allies lost the Battle of France, it seemed likely at this stage that the French government would relocate to North Africa and carry on the fight with the wealth of might of France's overseas colonies.
Therefore, it was only the more rebellious and generally younger men who stayed with de Gaulle, as well as ethnic Eastern Europeans and Jews. Remember that de Gaulle was an unknown at this point, a minor tank general and for all intents and purposes a renegade, having fled France at the beginning of June when he began to fear arrest by the Petain government if France surrendered. He had little resources and was completely dependent on the British government, which because of a traditional Anglophobia in the French military also hurt de Gaulle's chances of attracting many recruits. Those who stayed were viewed by many others as deserters and "English traitors". The proper way to fight on, most felt, was to return to France.
Source: Robert Gildea, Fighters in the Shadows: A New History of the French Resistance