Use the \Magento\Catalog\Block\Product\ProductList\Toolbar::setDefaultDirection()
method:
For a detailed description see how is the «Sort By» control implemented on the frontend product lists.
Usage examples
1
2
If you will change a core file then it will break the possibility to update Magento, or your changes will be broken by a Magento update.