Reduce the risk of numerical underflow
Arithmetic underflow can happen if the result of a calculation is a number smaller than absolute value than the computer can actually represent as a fixed length (fixed precision) binary digit. Instead returning the actual result of the calculation, the computer returns a zero.
Arithmetic underflow can happen in many statistical and machine learning models when many small likelihoods are multiplied together.
Taking the log of each likelihood increases the absolute value so arithmetic underflow is less likely to happen.