Schengen is just one mutual agreement of no border controls between member countries and enforced border controls to other countries. Any 2 countries which are not part of Schengen are free to enter a similar bilateral agreement.
They may not be religious, but many borders (probably most of those which aren't due to the natural geography?) are the subject or result of some kind of conflict. So is this border really that special? Probably most borders in Europe were the subject of conflict within the last 100 years, but we've ended up with the Schengen agreement nevertheless.