Currently, sorting by Subject uses the literal titles, so for example the following get sorted as:
abc
def
Fw: abc
Fw: klm
klm
Re: abc
Re: def
Often times, however, it would be more useful to have them sorted by the actual subject, with the email-specific prefixes ignored i.e. ordered as:
abc
Fw: abc
Re: abc
def
Re: def
klm
Fw: klm
In fact, this has long been the default behavior in many other email clients.