I think in this example the newer song is a form of sampling, in which the band paid for the right to use the music, or the copyright expired and they picked it up for free. It happens A LOT.
In general though, there are only so many musical notes. In guitar there are only so many chords, they are made to sound different based on tuning. I'm honestly surprised that there aren't more songs that sound the same as others.