What is the purpose of docRegistry.addWidgetExtension, could i bypass it?

Hello all,
jupyterlab extension guide has a example that add custom widget in header

export class WidgetExtension
  implements DocumentRegistry.IWidgetExtension<NotebookPanel, INotebookModel>
    panel: NotebookPanel,
    context: DocumentRegistry.IContext<INotebookModel>
  ): IDisposable {
    const widget = new Widget({ node: Private.createNode() });

    panel.contentHeader.insertWidget(0, widget);
    return new DisposableDelegate(() => {

function activate(app: JupyterFrontEnd): void {
  app.docRegistry.addWidgetExtension('Notebook', new WidgetExtension());

docRegistry is really abstract and unfamiliar to me, and don’t know its usage .
My question is, if notebook panel is easy to get, why not operate panel directly, such as

activate(app, notebookTracker) {
    notebookTracker.some_xxx_signal.connect((tracker, panel) => {
    } );

Is it more simple and straightforward?