
This is the last remnant of the highly-decorated gingerbread shapes common right up to the end of the 19th Century.
Joseph Jacobs collected versions of the Gingerbread Man story in his 'English Fairy Tales'. One tells how an elderly wife made a gingerbread man, who, as her husband tried to eat him ran away yelling "Don't eat me. Run as fast you can! You can't catch me, I'm The Gingerbread Man!" They run after him, and are joined by a pig and a horse, equally hungry for gingerbread. The gingerbread man accepts the help of a fox to cross a river (gingerbread men can't swim, they go soggy), who eats the little man up when half way across.

From The Little Gingerbread Man by Robert Gaston Herbert
For other varieties of gingerbread, see: Gingerbread