Why are Cavan Monaghan and Donegal not in Northern Ireland?

Cavan, Monaghan, and Donegal are counties located in the Republic of Ireland and never formed part of Northern Ireland under the Anglo-Irish treaty.
Copyright Wanderlust World © https://www.ynyoo.com