To put it simply, because he hated France, and Prussia and many other German states were allies with France. The other major alliance was Anglo-Austrian which he believed Russia benefited more joining. Catherine's father though a Prince of Anhalt, was a Prussian general. Alexis worried a German bride would tie them closer. Frederick of Prussia helped arrange the marriage to weaken Russia's link to Austria, and bring Alexis down.
Oddly Alexis later allied with Catherine, who brought him out of exile when empress. Odd he sided with the full German (Anhalt/Holstein) over the 1/2 Russian Peter (Russian/Holstein).
Peter oddly was meant to be King of Sweden. He was named heir by parliament to Frederick I, but Elizabeth chose him heir at the same time and renounced his claim to Sweden for him. Adolph Frederick was chosen king instead. Peter was great nephew of Charles VII. His paternal grandmother was Hedvig Sophia of Sweden, Charles' older sister. Hedvig was her brother's heir until she died, He was succeeded instead by younger sister Ulrika and her husband Frederick, and Hedvig's son was considered heir. Peter's dad died when he was he was small. Peter's mother left him in the care of his great-uncle Christian, prince of Eutin. Adolph Frederick, Christian's son was chosen king of Sweden in hopes of helping make an alliance with Russia since Adolph's father helped raise Peter. Wonder how different things would have been if Sweden claimed him first.