because the chord has an added 6th, so in B major the submediant tone or a major 6th from tonic B natural is G sharp. writing it for A flat would mean it's a double flated or a diminished leading tone or 7th which would be strange and hard to account for.
@ Above: The B is the next chord. The A flat from the Ab7 is repeated in a B6-9 chord, which progress to C, which then goes up in tenths, presumably to E flat (that would be my guess, anyways). I haven't played the piece, whatever it is, by Monk, but I'd be interested to hear it.Cheers!