both are true. they underestimated soviet strength, and they invaded primarily for defensive reasons.  from a speech on dec. 11, 1941 > a truly impressive amount of authentic material is now available which confirms that a soviet russian attack was intended. we are also sure about when this attack was to take place. in view of this danger, the extent of which we are perhaps only now truly aware, i can only thank the lord god that he enlightened me in time, and has given me the strength to do what must be done. millions of german soldiers may thank him for their lives, and all of europe for its existence. i may say this today: if this wave of more than 20,000 tanks, hundreds of divisions, tens of thousands of artillery pieces, along with more than 10,000 airplanes, had not been kept from being set into motion against the reich, europe would have been lost. several nations have been destined to prevent or parry this blow through the sacrifice of their blood. if finland had not immediately decided, for the second time, to take up weapons, then the comfortable bourgeois life of the other nordic countries would quickly have been extinguished. if the german reich, with its soldiers and weapons, had not stood against this opponent, a storm would have burned over europe that would have eliminated, once and for all time, and in all its intellectual paucity and traditional stupidity, the laughable british idea of the european balance of power as for dunkirk, germany definitely could have killed them all. why exactly didn't they is more debatable. maybe the military command, in particular hitler was just undecisive and didn't strike, or maybe it was a gesture of good will to facilitate peace talks. the ability was clearly there.
United States