I’ve encountered a few cases where a client has forgotten the password for the iTunes backup they’ve made for their iPhone, and the password was either set up on another Mac, or not stored in the Keychain.
With encrypted iTunes backups, the password is saved on the iPhone (or iPad), so even if you delete the backup on the Mac you will be unable to create an un-encrypted backup without knowing the password.
It is strongly recommended to encrypt your backups in iTunes – aside from the fact that there’s a lot of sensitive and personal information in the backups, if you don’t encrypt them then the backups don’t contain your passwords for things like email, wifi networks, and other apps.
In the past (on iOS 10 or lower) if you forgot the password, the only options you had available to you were to backup to iCloud instead of your Mac or erase the entire iPhone and start again.
Starting with iOS 11 however, if you can’t remember the password for your backup, you still won’t be able to restore that backup to another device, however you can reset the settings (not erase all content and settings) on your device and create a new backup. This new backup can either be unencrypted, or you can specify a new password to encrypt it (and either write this password down somewhere safe or store it in your Keychain!)
To do this, on the device go to Settings > General > Reset. Tap on Reset All Settings and enter your device passcode. This won’t wipe any data from your apps, however it will reset settings like your home screen layout, what wallpaper you’re using and the brightness of your display.
For more info, refer to Apple’s knowledge base article.