matSort
должен быть на элементе mat-table
<mat-table [dataSource]="dataSource" class="mat-elevation-z8" cdkDropListGroup matSort>
, а не на ng-container
<mat-table [dataSource]="dataSource" class="mat-elevation-z8" cdkDropListGroup>
<ng-container *ngFor="let column of columns; let i = index" [matColumnDef]="column.field" matSort>