 Series creator Joss Whedon wanted to do a musical episode as early  as the first season, but the network wouldnt allow him to. When the  show switched networks after the fifth season, he was finally able  to get his wish, resulting in the episode "Once More, With Feeling".