Music licensing is one of the most complex areas of copyright law. There are different rights in the song (i.e., the music and lyrics) and the performance. And, in the performance, there are special licensing requirements for use in other recordings (samples, soundtracks) and other media (TV, films, video games). On top of that, there are separate rights under most state laws regarding the use of a person's name, likeness, or voice without their permission. It can be a real quagmire.
What was most odd about the My Sweet Lord case was that the court held that George Harrison violated the copyright for My Sweet Lord, but did it unintentionally, i.e., it held that he had almost certainly heard the song and, when he wrote My Sweet Lord, the combination of notes sounded right because they were in his subconscious.