I think it's an unfortunate design choice. Useful for the developer but bad for the user.
On MacOS you can clear the keychain but iOS has no such tool.
if you jailbreak your phone you can clear the keychain for an app. it also might be possible to use third party tools to tamper with the iphone backup. imazing has support for backup editing but i'm not sure if it allows you to change the local keychain: https://imazing.com/guides/how-to-edit-iphone-ipad-backup