Original: Whedon wrote the song before the series was greenlit and a preliminary recording performed by Whedon can be found on the DVD release.
Simplified: Whedon wrote the song before the series was approved by Fox. An early recording done by Whedon can be found on the DVD release.