What is the purpose of the log when computing the MFCC?
The logarithm serves to transform a multiplication into an addition. It is part of the computation of the cepstrum. The basic idea is as follows:

Assume a source signal $x$ is convolved by some impulse response $h$. The resulting magnitude spectrum is

$$|Y(\omega)| = |X(\omega)||H(\omega)|$$

By applying the logarithm we get

$$\log |Y(\omega)| = \log |X(\omega)| + \log |H(\omega)|\tag{1}$$

If we want to equalize / undo the effect of filtering by $H(\omega)$ we can hope that this task is easier if we transform the convolution into additive noise. This is exactly what happens by taking the logarithm in (1).