An old American tradition. William Henry Harrison, the Log Cabin and Hard Cider candidate (after his supposed home and favorite drink) was the son of Benjamin Harrison V, governor of Virginia and signer of the Declaration of Independence.
The classic round-up of presidential origins is Edward Pessen, The Log Cabin Myth. N.B.: Pessen finds most of the (few) lowly presidents were Republicans and Whigs. The only Democrat to make his log cabin cut was Andrew Johnson, and he got to the White House as a Republican’s veep.