It is pretty common to change the key of a song for a solo guitar arrangement. Open string bass notes, pretty chord voicings and a good range on the guitar neck are among the desired effects. None of these are of real importance in Wes Montgomery’s arrangement, so it is uncertain why he chose to play the song in E-Major. Maybe he came up with the E-Phrygian Interlude (see below) at first and only then decided to tailor the arrangement around it.
The re-phrasing of the melody adds a nice flow to the arrangement and is partly necessary to comply with the Off-Beat-Phrasing that is typical to Bossa Nova music. Montgomery also elongated the form, it is twice as long as the original song. This makes sense because “Here’s that rainy day” is usually played as a ballad instead of the more flowing Bossa Nova rhythm. The beautiful melody would have to be played way too quick if left in the original form.
Here you can see the first four bars of the original melody in comparism to Wes Montgomery’s arrangement: