The simple answer boils down to a couple of factors:
- Military occupations can be very costly and expensive. For a country as densely populated as France, Germany would have had to commit a decent chunk of it's army to keep the annexed territory in line. This is expensive and costly, as Germany needed all of the soldiers that it could get. Examples of occupation soldiers being trapped in places such as Norway and Estonia later in the war helped prove how useful said soldiers could have been on the front-line rather than used idly or to hold down an occupied country.
- France was a major country. Establishing a puppet government that could give the illusion of legitimacy was very beneficial to Germany. By letting France appear to remain legitimate, Germany can benefit from puppeting Vichy and letting countries like the United States and the USSR to recognise the Vichy Government.
- Another minor reason might've been the fact that since France was in the West and bordered by Germany's allies, it wasn't strategically necessary to occupy the entirety of the nation, since there was nobody to protect the country from. This is why Germany took the North and Western coasts. Once the Allies began to threaten French North Africa, the Mediterranean, and France in the early 40's, the rest of France would become strategically significant, leading to the full occupation of the country in 1942.
- Germany took over 2 million French soldiers hostage after the Fall of France, using them as labourers and as leverage to keep France in line. Since France didn't have a foundation of manpower to quickly rebuild it's army, occupying France wasn't entirely necessary and the hostages could be used instead to encourage Vichy to cooperate. It's worth noting that these French prisoners could have made up as much as 10% of the French adult male population at the time.
All in all, in the end, Vichy France only lasted for ~2 years from 1940 to 1942 anyways, as Germany eventually occupied the entirety of the country in 1942. Occupations however can be costly and dangerous, especially for previously wealthy, powerful, and relevant countries like France that even in defeat could swing their weight in resistance.