The gear is simply sorted alphabetically. And case sensitively - it means first the gear starting with upercase letters (having lower ASCII value), and then all gear starting with lowercase letters.
It means if you want a specific order, simply edit the nickname of the gear, prefix the name for example with '001', '002', etc., and you have it sorted in the way you need. You can adjust it anytime you wish, and the impact is instant, at old activities, too.