The reason I would use a fingering like this is to place the longer finger (4) on the black key (G♯) — the leading edge of which is further away from the body than those of the white keys — and let the shorter finger (5) handle the white key (Fx = G). This has the advantage of allowing my hand to relax (contract) a bit on the A-Fx pair rather than leaving it open for the entire passage.
When I place finger 5 on G♯, finger 4 lies across F♯ and far toward the fall board. To maintain this hand position, I have to hook or curl finger 4 around the F♯, play on the narrowest part of the G, and also play where I have the least leverage on the key.
To adjust for that problem, I have to pull my hand back a fair distance, adding extra movement at a time I'm trying to play very quickly.
By using finger 4 on G♯, I can move finger 5 to G with much less overall hand movement. It does require curling finger 5, which is not ideal, but is okay here since it's for such a brief time.
Notice the hand position below compared to the corresponding hand position above. In particular, notice how much further the thumb travels in the first set of photos than in the second. That more dramatic movement (first photo pair) slows down the passage and is also less accurate.