Because Dunkirk was 'not' the end of the battle for France.
It was only the end for the British Army in France that got cut off (because of French leadership) and had to evacuate along with many French.
Not counting the British troops and French evacuated to Britain after Dunkirk...the French still had 1 million troops under arms that were falling back fighting, to a new line north of Paris v the 1.7 million invading Germans. The French top General who had commanded both French and British and caused 'Dunkirk' had been fired and replaced by a better General. All French....were called back to the colors because the battle was not yet lost!
The French had to give up their capital Paris and retreat further south, but their lines were solidifying and they were fighting better, the Germans as they continued to advance were getting tired at the end of their supply lines. The French still had the worlds 3rd biggest navy, and their 'colony' countries in North Africa and the Mideast with a fresh 700,000 fully equipped French troops. The British under new leadership of Churchill were helping all they could having total command of the seas supplying the French from both the French west coast and south coast as the French supply lines shortened, having their Brit planes from England harass the German rear, and stood by to transport the 700,000 French troops from North Africa/ Mideast to France to join in the fight.
This is why Churchill urged the French not to surrender.
Then....The French political right wing politicians calling themselves 'Vichy' overthrew the French government in mid career as it retreated from Paris, took over government and immediately laid down arms and surrendered all France to the enemy....in return for... the Nazi Germans allowing them (the French political right) to be the Nazi puppet fascist rulers of at least 2/3 of France under Nazi overview.
From historical records Hitler was 'astounded'....Churchill almost 'stroked out'....The 1.2 million man French Army (including returnees from Britain), the 700,000 man fresh French forces of the colonies, the colonies themselves, the whole French Navy...and...French Indo China...was delivered into the hands of the enemy....just so the French political right wing politicians could rule a 'puppet state' called 'Vichy France' for 5 short years (1940-1944).
After the War....Petain, Laval and all the other Vichite leaders were convicted of 'treason' and executed...except Petain who already in his 90's died of old age.