According to the Book of Judges, the men of Ephraim crossed the Jordan River to contend with Jephthah, the leader of Gilead. (Circa 1100 BCE)
When the men of Gilead then defeated the Ephraimites, they took control of the places one could cross the River Jordan. Fugitives from the battle, trying to get back to their own land, claimed they were not from the Tribe of Ephraim.
There had already developed a dialectical difference among the tribes of Israel. And Ephraimites, unlike Gileadites, had no initial 'sh' sound in their language.
Famously, when you don't have a certain sound in your language, you cannot easily just imitate that phoneme. It took me years to learn how to roll an 'r'. And, in Romania, I am called 'Andrei' (my Orthodox name is Andrew) because Romanians, who do not have a 'th' in their language, kept calling me either Keet or Kees.
The Gileadites devised a test to sort out the Ephraimites from innocent bystanders (Judges 12:6). They asked them to pronounce the word for 'stalk of grain' (shibbolet; שבלת).
[A later Hebrew sound change resulted in the 't' becoming 'th', hence the English word Shibboleth.)
The Ephraimites, unable to pronounce an initial 'sh' sound, said, "Sibboleth" (סבלת).
According to Judges 12:6, forty-two thousand Ephraimites died that day because of their inability to pronounce an initial 'sh' sound.
Cultural and Historical Connections
The word 'Shibboleth' has come into our language as a way to refer to any word or custom, the variation or pronunciation of which differentiates those inside and outside some group. It has also come to mean any untrue but yet oft-cited belief or saying.
The term has also now come to describe something people of a certain age, demographic, or specific set of interests, may have in common positively.
And so, for instance, I employ a Shibboleth when I ask someone, "Kirk or Picard?"
[NB: The correct answer is Kirk.]