What is the purpose of yoke in a dc machine?

It acts as a protected cover for the whole machine and provides mechanical support for poles. It carries the magnetic flux produced by the poles. The flux per pole divides at the yoke, so that the yoke carries only half the flux produced by each pole.