Towards a Theoretical Understanding of the 'Reversal Curse' via Training Dynamics