There are a variety of reasons why certain episodes air out of order. Some times they're extremely complicated and require extra time, like #405 "Pip" which aired after #414. Everything in "Pip" had to be built from scratch, including the new mouths with rotted out teeth that were used for most of the characters. Since Trey and Matt were looking for an entirely new look for Pip's England (in the same way that Terrance and Phillip's Canada had its own, unique look), everything had to go through a laborious approval process. In addition, "Pip" had live action sequences with the actor Malcolm McDowell, which involved casting, scheduling, additional planning, and post-production. These things take time, something we didn't have that summer. South Park had a run of consecutive episodes ending with #411 "Probably," and a hiatus for cast and crew. When a new run of episodes, "The Fourth Grade," began in September, there was time to finish the remainder of work on "Pip" in between the new episodes.
Special effects are another reason why certain episodes are delayed, like #310 "Chinpokomon" (which aired after #312) and #311 "Starvin' Marvin in Space" (which aired after #313). Other times holiday scheduling is a factor, as when #110 "Mr. Hankey, The Christmas Poo" delayed #108 "Damien" from airing for several months. #312 "Korn's Groovy Pirate Ghost Mystery" is a unique example where work on the episode began near the beginning of the season, but wasn't given an episode number because of it's late air date (Halloween). And lastly, certain episodes include the participation of special guest stars, as with #501 and Radiohead, whose busy schedules require careful planning.
Hope this answers your question. Next!