Until the age of recorded commercial music it was considered completely normal to lift tunes, harmonies, anything recognisable, from other composers. In classical music it's generally considered a complement, more rarely a parody. Copyright has been around for much longer with printed music: as early as the 1500's we see Henry 8th issuing protections. http://en.wikipedia.org/wiki/History_of_music_publishing#Cop...
And composers recycled their own work. Bach had to knock out three hours of music each Sunday for four years or so when he was Kapellmeister. You'd reuse!
To illustrate that: here's a video from the Canadian Broadcasting Corporation that looks at musical quotation, using the Star Trek:TOS theme. https://www.youtube.com/watch?v=aTaSjS1pwhQ