"Cheaper by the dozen" phrase origin?
Solution 1:
Using Eighteenth Century Collections Online, I found this note at the end of an anti-Catholic pamphlet titled A Protestant's Revolution (Dublin, 1734), where other pamphlets by the same publisher ("S. Hyde, Widow in Dame-street") are advertised for publication. At the end of the list appears a nota bene:
N. B. The above Books are sold cheaper by the Dozen or the Hundred.
The statement appears to appeal to cost in bulk.
It's hard to know when the phrasing became idiom, but this example occurring so early and in the context of selling books suggests that its origins were likely in something as prosaic as what the words literally mean together in a marketing context and not a peculiar plantation breeding program that should be well-documented but yields nothing in the resources I've used so far.
Solution 2:
The earliest variant of the phrase I could verify in print was 'cheaper in the dozen', from an article in the Hartford Courant (Hartford, Connecticut) of 24 May 1790 (paywalled, emphasis mine):
In New-York the price [of Webster's Spelling-books] has commonly been thirteen shillings New-York currency a dozen, which is three-pence lawful money cheaper in the dozen....
The exact phrase 'cheaper by the dozen' turns up a dozen years later, in the Hartford Courant (Hartford, Connecticut) of 12 Jul 1802 (paywalled, bold emphasis mine):
N. B. Said Chadwick will sell Morocco [leather shoes] cheaper by the dozen than can be bought at any store in this state.
Considering the context of the early uses, and the semantics of the phrase itself, the origin of the phrase is likely to have been marketing jargon.
I observe that the phrase was more recently popularized by the 1948 book Cheaper by the Dozen (Frank B Gilbreth and Ernestine Gilbreth Carey), as well as two movies based on the book, a 1950 original starring Clifton Webb, Jeanne Crain and Myrna Loy, and a 2003 remake starring Steve Martin, Bonnie Hunt and Piper Perabo. A central theme of the book and movies was the putative efficiencies of having a dozen children.
Thus, it might be proposed that the title of the book derived, however indirectly, from folk tales about or the putative practice of "plantation owners forcing prisoners of war [more commonly known as slaves] to impregnate their [own] mother[s], resulting in a 'dozen' 'cheap' children with severe birth defects." [Bracketed material in the quote represents an attempt to clarify somewhat unusual use of the term "prisoner of war", etc.]
However, even supposing the authors of the book went so far as to confess that the title derived from a real or imagined practice such as is described in the folk tale, that confession would not in itself be sufficient evidence supporting that origin of the phrase.
Solution 3:
In addition to the excellent answers that it talks about bulk savings, the reason why dozen specifically is due to the historical practice of bulk units being twelve. This can be seen in eggs to this day, and also in bakers dozen where the 'base' bulk unit of a dozen is rounded up to thirteen, and 'dozens and dozens' to mean a lot.
So this is a simple substitution of 'dozen' for 'quantity' or 'bulk' to say cheaper in bulk.