Hi Jessica,
When you join a number to a text string, the whole thing becomes a text string, and is sorted using the rules for text.
A1 will sort before A2 because the first character is the same in each, and the second character is different and 1 is sorted alphabetically before 2.
A19 will also sort before A2 for exactly the same reason: the first character (A) is the same in each, the second (1 or 2) is different, and 1 comes alphabetically before 2.
The order is decided at that point (just as the alphabetical order between "any" and "at" is decided without reference to the "y" in "any"—nothing is considered after the first character pair that is not a match.
Csound and Wayne have both offered a solution: add enough leading zeroes to the number to make the numeric part of every alphanumeric 'number' the same.
That works well, provided you can plan far enough ahead to predict the largest number part you will need.
Csound's single leading zero will work for numeric parts up to 99 (with the zeroes added only to the first nine numbers in any set), then fail at 100.
Wayne's suggestion of starting with 3 leading zeroes (making all the number parts four digits) will take to from 0001 to 9999 before failing, and because it's done with a formula, is easier to edit if you need to go to longer numbers.
Regards,
Barry