The reason it does this has mostly to do with the rmarkdown package, which relies on the ordering in the YAML in order to determine which output format to render by default.
When you click e.g. "Knit to PDF", RStudio does two things:
- Makes PDF the default output format by moving it to the top
- Knits the document to the default output format
In most cases this is the behavior people want, because it enables quick iteration (now the next time you click Knit, you get a PDF.)
It would be possible for the IDE to decouple these things, and render to a format without making it the default. However, it's not the majority case so isn't currently implemented.