Once wrote an assignment on the invasion of Sicily a while back, so everything I write may not be 100% and merely a quick over, so my comment may be removed..
After Hitler decided to invade Russia he took alot of troops from the Mediterranean area to fight in Russia and at this time the allied had some momentum in Northern Afrika. This momentum came after many setbacks in Afrika, so thr allied knew that this was the time to begin the invasion of Europe, which until then seemed impossible.
France wasn't an ideal place to invade based on the massive troop support in western Europe, both from Spain and Germany. Also Hitler made himself famous by his fortresses which was dominating the western coast of Europe. So, the allied now knew with the momentum in Afrika + the momentum in Russia the northern Mediterranean was know open for an assault.
The hope of a successful invasion of Sicily and the recent succes in Russia, would make it possible to attack Europe from 2 sides. The invasion wss tough, but the speed in which they progressed in Italy made Germany stand on their heels and the allied was know able to choke Germany, which lead to the invasion of Normandy.
And as said this may be removed, as it may not be 100% how it happened, but it should outline which events lead to the invasion of Sicily and why they didn't want to invade France.