Over-informative error messages (or error messages not meant for general consumption such as debug messages) can reveal targets or exploits for attack attempts.
Combined with an automated scan and injection attack, a page or application may be purposely fed inappropriate data to try and provoke a revealing error message.