Answer :

The main reason why the Allied decided to invade North Africa and Italy was that German and Italian forces were making advances that needed to be checked, and before the Allies could invade Europe (which was the ultimate goal), Axis forces needed to be weakened in the south.

I believe the answer is: German and Italian forces were making advances that needed to be checked, and before the Allies could invade Europe (which was the ultimate goal), Axis forces needed to be weakened in the south.

The allies felt safe to make the invasion because the majority of Germany's forces was held back on the eastern front due to the power of The Soviet's Union military. After conquering north Africa and Italy, Germany's forces was forced to surrender since they are surrounded from both western and eastern front.