The expression about unacceptable behavior that’s based in Irish history.
Around 16,000 BCE the melting ice from the Ice Age raised sea levels and separated Ireland from Britain. Then around 6,000 BCE Britain became separated from mainland Europe. Since around 8,000 BCE the island of Ireland has been steadily inhabited but whether these early settlers arrived on a disappearing land bridge or by boats is unknown. The Celts much came later (exactly when is debated) but somewhere starting around 500 BCE.
The long conflict between the Irish and English stems from the 1169 CE Norman invasion of Ireland. An 1155 papal decree by Pope Adrian IV (who, what a coincidence, was English himself) granted King Henry II of England the right to invade & govern Ireland. This was the start of the next several hundred years of English colonization of Ireland.
Us From Them
The Lordship of Ireland began in 1177 but England really only ruled over parts of Ireland. Some of the Lords who had been given land assimilated to the local Irish culture, the crown gained land and lost land, and gradually the area under English control shrank. By the 14th century only a region around Dublin was still under English control. To clearly mark the King’s territory, to separate “us from them”, a wooden fence was constructed along portions of the border. This border was the pale, from the Latin “palus” for a stake or fence. So, the native Irish living free outside of the control of the English crown were “beyond the pale.”
To try and control their subjects the English put in place various laws to prevent Irish influence. Marriage between English settlers and the Irish was forbidden, as was speaking Irish Gaelic, dressing like the Irish, or even cutting your hair like an Irish person. These activities were deemed unacceptable behavior and were “beyond the pale.”
Added info: the oldest structures in Ireland, sometimes thought of as Celtic, existed long before the Celts arrived in Ireland. Newgrange, the 5,200 year old passage tomb just North of Dublin, was created 2,500 years before the Celts arrival (it was also created before the pyramids of Giza).