It seemed mysterious only for a while? I am impressed!
Those who are curious about how you too can induce
needless confusion in hapless fools who want to use
your code can read
About Prototypes... (No, this is not one of the corners
of the Perl language that I think was a particularly good
The explanation I remember from perl5-porters for this odd difference in behavior involves the optional filehandle argument for printf. The way prototypes were designed for the builtin functions, a prototype which allows for an indirect object has to specify list context for all the regular arguments. Since sprintf doesn't have an optional file handle argument, its prototype specifies a scalar for the first argument, and a list for the remaining arguments.
So, this difference in behavior between printf and sprintf is more by accident than by design. While the prototype for sprintf could be changed to match the prototype for printf, doing so would break backwards compatibility, particularly where the first argument to sprintf is a subroutine call.