When an extension which is meant to override the default search engine is sideloaded by adding its xpi file to the profile folder, it does not override the default search engine. This seems to be because the extension is not sent an event with the startupReason of "ADDON_INSTALL", and that's the only case in which the setting for the default search is written to the ExtensionSettingsStore (ESS). This also means that if the extension is later disabled and re-enabled, it still won't update the default search engine, because the ESS doesn't know that needs to be done. I recently looked at a similar case where an extension was being sideloaded via the Windows registry and that did not suffer from this same problem, which seems odd, but I suppose those two methods of sideloading behave differently.
Repurposing this bug to be about confirming the behaviour that exists, but seems to perhaps have been unintentional. If an extension wants to override the default search engine it can do so by setting chrome_settings_overrides.search_provider.is_default = true in its manifest file. If it is setting the default search engine to one of Firefox's built-in search engines, then that should succeed even if the extension is sideloaded. If it is setting the default search engine to a new search engine, however, it should not succeed in doing so if the extension is sideloaded. A test should be added to verify this behaviour to protect against regressions.