To set default sort for ActiveDataProvider, you can use following code:
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort'=> ['defaultOrder' => ['name'=>SORT_ASC]]
]);
OR
$dataProvider->sort = ['defaultOrder' => ['name' => SORT_ASC]];