Generally it's because Anime is adapted from another media like Manga, Light Novels or Games. as discussed by Krazer in this answer on Anime and Manga
An anime is typically adapted from another source material. Usually it's either a manga, a light novel series (like Haruhi), or even visual novel/computer game (Little Busters!, the When They Cry series).
Some parts maybe cut, changed, rearranges, and sometimes new content is added all together scenes completely.
While some changes are welcomed by fans, most are not. One most unwelcome additions are the so called filler episodes. A filler episode can be as short as 1 episode, or as long as an entire season of the anime. These episodes were not a part of the original source content's story, and usually serve absolutely no purpose in furthering the main story.
One of the two main reasons that we see fillers because they are meant to buy time for the anime when the content catches up to the pace the source material. This delay give the authors some time to adapt more material for the anime. After all, you can't really adapt something that doesn't exist yet.
The other reason for fillers to exist is greed. Some productions like to milk an anime for more money by making a few episodes of filler in a season, to add to disc sales (so fan buy n+1 discs instead of n). Anime productions usually make the bulk of their money in disc sales.
Generally, fans don't like fillers for the following reasons:
- They are pointless, and don't add to the plot of character development in any menaingful way. Sometimes it takes away from the action and go on bizarre tangets only to end up exactly where they began (it's was all a dream!).
- They sometimes add plotholes or other contradictions to storyline and a considered non-canonical.
- They (usually) aren't written by the same author as the original source material, so the quality and vision of the story might not be up to standards.
It seems that it would make more sense to wait for the manga and then release cohesive episodes
Because ultimately waiting doesn't make money.
Unless the series is really popular (such as Dragonball Z) there is the risk that by not releasing anything new people would end up forgetting about it and when new episodes get released (regardless if their are filler not not) viewers have already moved onto other series's, spending all their money on disks/books/merch for that series and thus no money or time for a returning series.