Audio engineers play an important role in three parts of the process for creating music. These parts are recording, mixing, and mastering.
Sometimes three different engineers, who specialize in each, complete these parts separately. Sometimes the lines are blurred between the three distinct phases.
Regardless, it helps the mastering phase to have a great mix. Similarly, it helps the mixing phase to have a great recording. Therefore, it can be helpful to keep the big picture in mind.