The M in the Mel Frequency Cepstral Coefficients (MFCC) stands for the Mel scale.
The Mel Scale accounts for a non-linear phenomenon associated with perception (in general) where equal input intervals do not produce proportionally equal perceptual intervals. For more information about this, you might want to check this Q&A and its references.
The $\log$ function in this process is what "transforms" the input from Hz to the Mel scale.
There are quite a few fundamental references in the Wikipedia resources cited above, including a reference to the paper that established the Mel scale.
Hope this helps.
I am not sure which "vertical axis" you are referring to in the comments because if you are referring to the "vertical axis" of the FFT then the answer would be "no", but if you are referring to the "vertical axis" of a spectrogram then the answer would be "yes" because that axis is the one that corresponds to ->frequency<-.
With reference to the following image (which is reproduced from here ), the Mel Scale is what creates this non-linear mapping. Therefore, you use the filterbank to segment your frequency domain into $N$ "bands" to then take the log of the power within those bands.
Hope this is more clear (?)