The story
From the old rhyme "if 'ifs' and 'ans' were pots and pans, there'd be no work for tinkers" (and variations). Compare if wishes were horses, beggars would ride. See an in archaic sense meaning "if".
Etymology from Wiktionary, CC BY-SA 4.0.
Today it means: hypotheticals; counterfactuals; things that one only wishes were the case Full definition →
From the old rhyme "if 'ifs' and 'ans' were pots and pans, there'd be no work for tinkers" (and variations). Compare if wishes were horses, beggars would ride. See an in archaic sense meaning "if".
Etymology from Wiktionary, CC BY-SA 4.0.