It's a fairly baffling Blackberry behavior, but it's the behavior nonetheless. If it is password locked and you enter in the wrong password 10 times, it erases everything on the device (after giving you a warning that it is about to do so and giving you a chance to abort).
I've never tried it with my BB, but my understanding is that one or more times along the way during the 10 failed password attempts, it prompts you to type in a specific word. It only continues this process if you get the word right. This is to avoid the possibility of you "pocket dialing" the wrong password 10 times and erasing everything on the device.