Chefs master recipes through learning certain basic skills that are the root of all cooking regardless of the recipes. In addition, having a repertoire of basic recipe types that use those skills allows them to substitute different ingredients to make different dishes, rather than just memorizing a set of recipes.
While chefs do learn lots of complex recipes and sometimes memorize them, they usually do so after learning the basic building blocks of those recipes, the techniques and basic ingredients. For example, after learning how to make one of the most basic types of sauce, such as a bechamel sauce, a chef only has to add grated cheese to make cheese sauce for pasta.
Chefs also learn basic knife skills. Knowing how to properly chop, slice and dice gives chefs the ability to shape nearly any vegetable or meat that comes their way into easy-to-cook portions.
When top chefs share the skills that they think are the most important in their work, most say that basic tool skills and the ability to taste are the most important elements of their jobs. Rarely do chefs point to the importance of being able to follow a recipe as something to be mastered.