It places them based on views and upvotes, if two people respond to the same comment and start different threads off of each, the one with the most ‘popularity’ will move to the top, instead of first come first serve. It allows good comments to rise above not so good ones that may have been posted before.