Listing order in movie credits

I tried a search, but the words “movie credits” yield 9 pages of threads, so I apologize if this has been covered.

Who or what determines in what order movie credits are listed? Does it matter if the Grip comes before the Foley Artist or after Assistant to the Caterer’s Dogsitter? Is it a Union issue, the director’s preference, or is there a standard?