Because in an alternative universe, they could have chosen to treat log messages like SQL where parameters are passed separately.
Obviously some people must believe that logs should be trusted input, otherwise we wouldn’t be in this situation.
That said I consider both logs and error exceptions as untrusted input, but purely on practicality.