The derivation_and_script_type_dialog seems to be called when the wallet is being created using a hardware wallet not from an Electrum seed phrase.
Oh yes, of course... it also uses it when restoring from a BIP39 mnemonic.
Most likely this is because Electrum mnemonics are "versioned"... so the script type is encoded in the mnemonic itself. Electrum reads that, then defaults to using the encoded script_type and appropriate derivation path automatically.
I've noted that the derivation path is stored in the "keystore" within the wallet file as well:
"keystore": {
"derivation": "m/0'",
"pw_hash_version": 1,
"root_fingerprint": "da996cc9",
"seed": "naive goddess they empty super bone friend visit segment person act palm",
"type": "bip32",
"xprv": "zprvAaAs87fpU4gB4oxt9ALBFa6rFj5g4ti1GH71qHHVt8hEcj1N7Ct5CmX1nFB94FewoH5Pmy9dCmRjkTCWzYfsNowk6angDwgdKug8QbMLddf",
"xpub": "zpub6oADXdCiJSEUHJ3MFBsBci3aokvAUMRrdW2cdfh7SUEDVXLWekCKkZqVdVhW2jXUGr5umrchPNxwfdaQjxkc854SGvaG5Qd8rifoCrGQAnx"
},
"keystore": {
"derivation": "m",
"pw_hash_version": 1,
"root_fingerprint": "65751984",
"seed": "comfort history avocado badge genre uphold rely evolve soccer beef defy spoon",
"type": "bip32",
"xprv": "xprv9s21ZrQH143K4VH6GX2JjtPu9DtUQ5BJF1VUf59Eexcaez3W5QtTRm4YeKMwL1iP9WUkAgRmw63Ls4nwHjPdTiv6sAU1LqzFCHxKJ2dATSw",
"xpub": "xpub661MyMwAqRbcGyMZNYZK72LdhFixoXu9cER5TTYrDJ9ZXnNecxChyZP2VaconGXsfh6Vof1vn2qFD5GU1Wgi2VkNxU344HNgSsRQLLiFv8b"
},