Why is cheating on corporate accounting ledgers called “cooking the books”?

If someone is using creative accounting, he is usually breaking the law, and so he needs someone with sophisticated bookkeeping skills comparable to those of a skilled chef who can prepare a dish so artfully that no one can tell how it was done. If authorities discover that the books have been cooked and criminal charges are laid, it is said that the accountant and the employer have “cooked their own goose.”