Everyone in the Guard was acutely aware of the possibility of deployment to Iraq, from 2003 on.
So, when preparing his run for Congress, Walz decided to retire from the Guard.
Another factor to consider was the educational and testing requirements to continue as a Command Master Sergeant, which were incompatible with running for Congress.