There are many reasons to write a cookbook.
Perhaps, you are an aging 14th century Parisian compiling a housekeeping book to instruct your young wife on how to look after her lord, manage her newly-bestowed house and of course, prepare banquets.
Later during the 16th and 17th century say, you would probably be publishing as the chef to a nobleman or clergyman. This book would sell your own knowledge, raise acclaim for your benefactor and commit to posterity a record of the privileges of wealth.
Aspirational cooking has long been a part of how we cook.
Cookbook traditions follow cultural traditions. They move from medieval household manuals to renaissance instruction manuals. They develop over time from simple lists of ingredients to complex images of papal feasts with diagrams of the insides of kitchens and long lists of utensils (the first known picture of a fork, for example, only made its appearance find in a 16th century cookbook.)