So I have been studying Bach's famous WTC on piano. Even though I really enjoy the preludes and fugues, and I have found some nice preludes to warm up and exercise my touch and fingers, why did Bach put preludes before all the fugues? In some cases I think I have more chance to solve the Navier Stokes equations than to understand why he put that prelude in front of that fugue... Was the prelude literally a "prelude" in the sense of warming up? Or was it simply tradition for Bach to write a prelude before a fugue? Also, I do know that Bach wrote the WTC probably for educational purposes (and maybe as a challenge for himself to write in all keys).
It's important to remember that the various keys sounded distinct from each other in Bach's day. "Well-tempered" is not the same thing as "equal-tempered." The preludes help introduce the idiosyncrasies of each key in a relatively simple texture before confusing the soundworld with extreme polyphony. They aren't so much warmups for the keyboard player's fingers as they are "warmups" for the listeners' ears. You're correct that there is rarely if ever any sort of motivic connection, but I do think that often the preludes help set a mood which the fugue can either inhabit as well, or contradict in interesting ways.
Bach must be understood in the context of his time. The Baroque Prelude was a common form of the time, and was often improvisatory in nature, similar to a Toccata or a Fantasy. Numerous examples abound, especially in German keyboard music, of preludes coupled with fugues. Aside from key, there really is not meant to be much of connection between the movements.
Here are some examples:
Johann Pachelbel -- Prelude & Fugue in D minor:
Dietrich Buxtehude -- Prelude, Fugue, & Chaconne in C major:
George Fredrick Handel -- Prelude & Fugue: