Yes and No. The settings aren't STORED in the head unit, but that's the only user accessible interface for changing them. If you replace the HU, a mazda service center can usually change the settings with one of their tools (and they'll likely charge you for the service), or you can plug the old HU back in to make a change.
Usually, you should just try to get everything the way you want before changing the radio.
You can get android based HU's that retain most of the options, for everything else (that you would probably never need to change) Mazda dealerships can edit the settings by plugging a tool into your car. It's how they interface without using the headunit, same functions + more that you can't access.