The strange perimeter originates from 1198, the result of a series of diplomatic land swaps between the Lord of Breda and the Duke of Brabant. Quite a normal situation throughout Europe in feudal times. Elsewhere in Europe these parcels were consolidated over the years and borders rationalised, a process that Baarle somehow avoided. When the present border between the Netherlands and Belgium was drawn up in the Treaty of Maastricht (the 1843 one, not the 1992 remake) the issue of Baarle’s complex border was put aside. A few maps of the area were attached to the treaty for reference, but in the meantime “%E2%80%9CThe status quo shall be maintained both with regard to the villages of Baarle-Nassau (Netherlands) and Baerle-Duc (Belgium) and with regard to the ways crossing them%E2%80%9D.” Working out the details would be come later.
http://www.iamdanw.com/wrote/what-are-borders-anyway/