TELLES0808 - events (including triggers) run top to bottom. So your first set of events runs like this:
1. User touches the 'som' object
2. The touch object runs 'On touched 'som'' in top to bottom order in the event sheet
3. Event 2 runs. The animation frame is set to 1.
4. Event 3 runs. The animation frame was just set to 1, so this event is also true. So it sets the animation frame back to 0 and restarts the music.
In other words, both events run at the same time. It's a common mistake. In your second example it works because you first toggle the variable then check the result, so it's not possible for both events to run at once.
The best way is just to use 'else' in a subevent, like this:
+ On touched 'som'
----+ Animation frame = 0
----> Set animation frame to 1
----+ Else
----> Set animation frame to 0
This works because 'else' doesn't check the animation frame again, it only runs if the previous event did not run.