When I played the accordion for my church orchestra, I had to learn how to transpose hymns by sight. The pianist really didn't like to play in keys with sharps, like D or E or A, although the guitarists preferred those keys. Guitars are tuned in such a way that chords with sharps are easier to form than chords without them, like C or F major. Pianos, on the other hand, are arranged better for keys with flats, like E flat or A flat.
For whatever reason, our pianist would routinely hold up her left hand and signal a key change if the original hymn was in a sharp key. I had to learn to transpose by reading the sheet music in the original key, but playing the song in the new transposed key. If the original song was in D, but she transposed it to C, I'd have to remember that C was the root note, and everything else went from there. Everything else was the same, with 1-4-5 chord progressions, but the tonic note was different.