Itachi didn't break free from Edo Tensei on purpose... He had planned to die and stay dead. The only reason he broke free was because Kotoamatsukami activated on him rather than Sasuke. Nagato had no sucha ability to free himself, and he didn't plan that far ahead because he wasn't counting on dying. He probably wouldn't have died if he hadn't decided to bring everyone in Konoha back to life.