Many C19 explanations of nursery rhymes are fanciful. This one though appears to be true. Jack Horner was said to have been the steward to the last Abbot of Glastonbury at the dissolution of the monasteries by Henry VIII. To buy off the King the Abbot sent a gift of the deeds of 12 manors concealed in a pie. Horner extracted the plum one of Mells and sent the pie on one short. Now, the owner of Mells thereafter is indeed shown on records as Horner, but as Tom. However 'Jack' was a common nickname for a rogue. Tom Horner was, conveniently, on the jury that condemned the Abbot to death , too. Oddly, a pastry pie was once a means of secretly conveying valuable documents; it would pass unremarked but would not be opened until before the head of the house."Sing a song of sixpence" is a punning reference to this practice, Pye being a C17 Poet Laureate who sent bad sets of verses to the king. See Opie 'The Oxford Dictionary of Nursery Rhymes' (OUP) 2nd edn. 1997 ; ISBN 0-19-860088-7