can you please format your config as code? There’s a button in the editor that looks like: </> and this will help us see whether the problem is with the whitespace in your file.
So, I think it happened because when the trigger was sent, there was a change in one of the listed folders folder1, folder2, on the master branch. This would have matched the first clause in your rule, which runs on_success, and so the pipeline ran.
Without the && $CI_PIPELINE_SOURCE != "trigger" in that clause, the pipeline will run without the second clause being considered.
@srink
rules are evaluated in the order you specify them (from top to bottom). First match wins.
As @snim2 mentioned, you most likely had changes in folder1 or folder2 so that rule matched and the 2nd wasn’t checked anymore.