in many different songs, you have a change from minor to major with a minor 7th... It's a common chord change, and it hads tension to the song...
The theory behind it??? We go from ionian to myxolydian. Actually, the first and forth chord of those scales have a strong relationship, so strong you can sub them for each other. That's why in blues, you can play the 1 4 5 but, they're all 7 chords, instead of being a M7, M7, and 7, according to the major chord scale.
In hotel california, that's what happens, and it is the same in gospel songs.