Cleaning output folders when you do a build is a project option that's turned on by default. To change it, open the project Preferences dialog and select
Java Compiler/Building - it's under the Output Folder options.
The reason for this is that Eclipse is attempting to guarantee that the source code in your project is, in fact, sufficient to create the desired output and that any obsolete output be removed from the system. Sometimes "obsolete" output really wasn't obsolete, and even if it was, it's wasting space.
This is one reason why when I work with code generators I prefer to use 2 source directories. One for static code and one for generated code. Your life will be much more pleasant if directories are input-only or output-only and don't attempt to be both. Generated code is both at some time in its life, but by isolating it, you can nuke and re-generate without harming the static source.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.