This is true. It really depends on the system. In default D&D, the skill is Open Locks, not Open Locks and Avoid Bad Stuff. The roll is only to see if you open the lock or not, so everything else is unconnected.
Something always happens, even it's just a failure to accomplish your goal...