BAKERS DOZEN—A little extra, usually meaning 13—“Make it a bakers dozen and you have a deal.”—Traced to an act of the English Parliament in 1266, laying down standards of weight for bread. In order to make certain of meeting the standard, bakers adopted the practice of giving 13 loaves to vendors for each dozen they bought to sell to consumers. http://www.bartleby.com/61/37/B0033700.html
ETYMOLOGY: From the former custom among bakers of adding an extra roll as a safeguard against the possibility of 12 weighing light.
Yes. It’s a tradition that started in France a long time ago. Buy a dozen and the baker would throw in a lagniappe, an extra one. This, BTW, is the origin of the word lagniappe.
As far as I know, lagniappe is not a standard French word. It is found mainly in Louisiana Creole (and now in English). It apparently derives from Western-Hemisphere Spanish la ñapa, “the gift”, which is from Quechua (the language of the Incas).