(I will suppose that the connection of French "histoire" to English "story" is rather clear, except that the English word is closer in its meaning to a "story as it is told", whereas the French one is a little bit closer to "events as they have happened", or "events as they are canonically told".)
"Histoire que" means "just on order that", or "only in order that". It is used when you want to downplay the need to explain whatever precedes "histoire que", rather than provide a boring, strong, rational purpose for it. You could even use it nearly tautologically, similar to "I replied just in order to say anything", which in reality means "Never mind what and why I said exactly, I just wanted to keep the conversation going."
Dominique Legallois, in his article "Le connecteur histoire (de) au regard de ses occurrences dans Frantext" (Syntaxe et Sémantique, 2007, 8, p.61-74) hypothesizes that the origin of the phrase might have originated from a fixed phrase "l'historie de rire", first meaning "[to make a] story to laugh about", and later "just so that we can have some fun", or perhaps a little more literally "in order to have a story we can laugh about". (I can't guarantee that my presentation of his findings is accurate, I haven't read the article in entirety.)
Note that "rire", in this phrase, is the infinitive form. If we assume, along with Legallois, that people started to substitute different verbs for "rire", sometimes the infinitive just wasn't flexible enough for what they wanted to say. They may have wanted to express the grammatical subject, or tense, or whatever, as well. If this is true, they'd be forced to evolve "histoire de" into "histoire que" for purely grammatical reasons: to be able to continue with a more flexible definite verb form.