I'm not saying the current behavior is necessarily "broken", but perhaps
we could enhance it further.
The intent was to affect messages that are a "surprise" for the user.
eval-last-sexp is invoked by the user, so no surprise here.
But not all 'message' calls are a "surprise". One might even say that
the vast majority of them aren't. And yet, they obey set-message-function.
We provided a possibility to customize this functionality out of
principle, without investing too much research into the various ways
this could be used in situations very different from those for which
the code was written, which is display of a message when the
minibuffer is active. It is possible that using this as a
customization tool in other situations could also make sense, and that
other sense would then suggest us that the feature should be extended
to other means of displaying messages in the echo area.
However, it sounds too early to consider those additional
possibilities. I'd like first to collect real-life use experience
with this feature in Emacs 27.