 José Feliciano (qv) was asked to write a theme song. He was  worried that the producers would reject his song, so he wrote two.  The producers bought both of them and used one at the beginning and  the other at the end.