In the seventeenth century, when a ship’s mast was damaged at sea, a “jury mast” was rigged to hold the sail until the replacement could be found.
Because this was a critical situation the repairs had to be done within a day, or in French un jour, which in this case is the origin of “jury”.
Something jury-rigged is a temporary repair and has nothing to do with “jerry-built,” which means permanent bad work.
The term “jury-rigged” often refers to a temporary repair with whatever is at hand.