Consider the following two reactions (source):
I don't quite get why the products shown are the main ones. In reaction 3A., if you rotate the carbon facing us by 120 degrees clockwise, the anisole would be antiperiplanar with the leaving group and should migrate instead of the phenyl group. In reaction 3B., the same rotation should lead to a migration of the phenyl group instead of the anisole group.
Why does phenyl migrate in the erythro isomer and anisole migrate in the threo isomer?