It happens because whatever front-facing app (or apps) you're using are taking up RAM, and the Launcher (which is not in the foreground) is being kicked out of RAM to save performance of the foreground task. This is just how the RAM management works. It'll happen more often if you have multiple homescreens with lots of widgets, as the RAM footprint of the Launcher at that point is larger.
3rd party launchers offer "keep home in memory" options if you'd prefer.