There several reasons why Hitler invaded the Soviet Union.
1. He had it already planned a long time ago, written in his novel Mein Kampf.
2. He wanted to beat Stalin before the USSR gets Germany.
3. Since he was a socialist, he wanted to spread it internationally.