See the Testing Guide in the developer documentation for more explanation.

We must respect the setup used by the selftest command regarding
plugins. This allows the user to control which plugins are in effect while
running these tests and respect the import policies defined here.

When failures are encountered for a given plugin, they can generally be
addressed by using lazy import or lazy hook registration.