Alexander Courage wrote the music for Star Trek (the original series). However, series creator Gene Roddenberry wrote lyrics to the song, even though he never intended to use them on the show. The reason? Under their contract, writing lyrics - even ones that were never used - meant Roddenberry would get half the royalties of the song!
Beyond the rim of the star-light
My love is wand’ring in star-flight
I know he’ll find in star-clustered reaches
Strange love a star-woman teaches.
I know his journey ends never
His star trek
Must go on forever.
But tell him
While he wanders his starry sea
Remember, remember me