To suit the key of the song to the comfortable range of the vocalist (a critical skill for accompanists).
To suit the preferred keys for certain instruments in an ensemble setting. (a critical skill for band members) Guitarists, for example, like to play in keys with open strings such as of E and A and horn players prefer “flat” keys such as F, Bb, and Eb.
To be able to play a favorite lick, chord progression, or other pattern in various keys (a critical skill for Blues and Jazz improvisers).