Thirteen for twelve. When a heavy penalty was inflicted for short weight, bakers used to give a surplus number of loaves, called the inbread, to avoid all risk of incurring the fine. The 13th was the “vantage loaf.”
Mr. Riley (Liber Albus) tells us that the 13th loaf was “the extent of the profit allowed to retail dealers,” and therefore the vantage loaf means, the loaf allowed for profit.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Baker's Dozen from Fact Monster: