In a jiffy
In an instant.
Consider these idioms and similes, all of which mean, more or less, 'instantly':
As fast as greased lightning
As quick as a flash
In a trice
In two shakes of a lambs tail
They were all coined as a reference to some existing item that was known to be rapid and short-lived. Even to rarely used 'trice' just means 'a single pull or jerk'.
Consider now the thought process of the 18th century linguist who decided we needed a new phrase to mean 'instantly'. He might have opted to refer to something that was known to be fast, like the 20th century incarnation of his kind who coined 'faster than a speeding bullet'. Instead, he decided to coin 'in a jiffy'
In answer to the question 'why a jiffy?' there doesn't seem to be any better answer than 'why not?'.
You might expect a jiffy also to refer to some specific item that epitomised quickness.
Not so, a jiffy is just a jiffy.
See also: the meaning and origin of 'in a trice'.