The recommended way to sort columns from Arcpy is this:
import arcpy
fc = 'c:/data/base.gdb/well'
fields = ['WELL_ID', 'WELL_TYPE']
# Use ORDER BY sql clause to sort field values
for row in arcpy.da.SearchCursor(
fc, fields, sql_clause=(None, 'ORDER BY WELL_ID, WELL_TYPE')):
print(u'{0}, {1}'.format(row[0], row[1]))
After reading: https://community.esri.com/t5/python-questions/sql-clause-in-arcpy-da-searchcursor-is-not/td-p/51603
I found this reference in the documentation of ArcGIS: https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/the-in-memory-workspace.htm
Limitations Memory-based workspaces have the following limitations:
Memory-based workspaces do not support geodatabase elements such as feature datasets, relationship classes, attribute rules, contingent values, field groups, spatial or attribute indexes, representations, topologies, geometric networks, or network datasets.
Specifically Attribute indexes means you cant sort.