The Dhammayut was established in the 1800s by the prince monk Mongkut who considered Thai Buddhism at the time to be corrput and the monks not properly ordained according to correct proceedures. Mongkut sort out some Mon monks and took re-ordination (after initially ordaining under Thai monks). He was so concerned with following the commentarial regualtions on ordaining that he redid the proceedure about 9 times.
Gradually the number of monks ordaining under this lineage increased and they considered the other monks with disdain. They refused to conduct ceremonies with them. The original group of monks in Thailand came to be know of the Mahanikaya meaning the great/big group. After a while the Dhammayut was recognised as a separate sect.
So from the beginning the majority of monks was Mahanikaya. These days there are still many more Mahanikay monks and temples and this is one practical reason to ordain into this group. Monks of the 2 nikaya do mix, but generally they only stay in their own temples.
Dhammayut monks were more strict, and maybe still are, but it is hard to generalise as there are strict Mahanikaya ones (such as Acharn Cha group monks) and lax Dhammayut ones.
The teachings should be the same in each group, but there are slight variations in the wording on the ordination ceremonies. The chants used also differ slightly.