Well, it wasn’t all ideology. Both Germany and Russia had coveted the same land in Eastern Europe for centuries.
That has always made me wonder what would have happened if Nazi Germany restricted it's expansion to the east.