Hello dan no 1. Valid question indeed - "Haploid" is the joking answer if you're a techie, but the real answer is probably that it comes from the Greek monogram for Jesus, "IHS" or "IHC." The "H" is the capital form of the Greek letter eta, but was reinterpreted as being the Latin letter "H" (that is, "aitch"). (In the "IHC" variant, the "C" is the Byzantine Greek form of sigma, the "S" letter.)
The IHS or IHC monogram was (and still is) used on religious articles as an emblem, and people unfamiliar with the Greek assumed that the "H" was a part of the name "Jesus" or of "Jesus Christ." (A similar mistake was made many centuries earlier; a common spelling of Jesus in medieval Latin was "Ihesus.")
The use of "Jesus H. Christ" as a profane oath dates back at least to the late nineteenth century, but was probably around earlier. Mark Twain wrote in his autobiography that even in his childhood the oath was considered old. A lot of people think it is a modern Americanism but it probably pre-dates this.