It helps prevent anyone from accessing your voicemail messages. Setting up a voicemail password is always important due to security reasons.
This could be the last 4 digits of your social security number, or 1111, or 0000, or 1234. Note: When you purchase your iPhone, there is a default voicemail password that is set. Part 1: How to Fix 'iPhone Asks for Voicemail Password'