It's a simple way of giving the programmer the option of including the line number in the message or not. It is indirectly mentioned ("just like die") in warn's documentation.
Comment on Re: Perl dropping " at line xxx" from warnings when "\n" is present