If somebody has code that does this:
if (something)
LOG("My log message");
That would expand to:
if (something)
Lock lock (logMutex);
// A bunch of other code
Which is incorrect (only the first line would be under the if statement).
The macro makes sure that the macro call is inside of a block of code.