My configuration results in an environment where you can only evaluate code within the document and never during export or tangling. That way it is easier to understand what happens when.
Code is only ever evaluated when you execute the document. The results of execution are stored within the document. That is my workflow.
Knitr in comparison does the opposite only evaluating code during export.
Here is the easiest way to make sense of what happens when resulting in what: