Why Germans invaded Africa?

To help the Italians who were suffering losses. After a while, the objective was to push through Egypt into the Middle East (for the oil).