When sorting a column of tag values, Retool is sorting by the underlying value not the label name itself. This is an image of the table columns, where I am trying to sort by the Firm name alphabetically.
I tested it in my app, and it works perfectly as shown in the screenshots and If you want to sort data perfectly in your app, you can use a transformer and a custom JavaScript query