I figure mutual dislike of Russia(the old “my enemy’s enemy is my friend” adage had a lot to do with this.
Germany and Russia are collaborating for mutual assurance of energy from Russia and technology from Germany.