User blog comment:ChaosEnforcer/Geth Reaper code/@comment-4220180-20121026230420

They did that due to the quarian attack. Legion explained it. As they were getting killed, their intelligence dimmed (due to the networked intelligence). At that point, self-preservation took priority. Then, they turned to the Reapers to save themselves.