What are the main reasons for filler episodes?
Filler episodes aren't supposed to be bad at their fundamental purposes.
They are supposed to mainly close opened gaps and holes in the plot of the main series.

They could be also be used to divert the main story into a different one.
For example, in Naruto, there are many "side-stories" that couldn't be connected to the canon (like the stories from the video games/movies, but not all of them though).