Some exceptions are things necessary for normal life, that would be impossible to do in advance. A classic example is lighting a fire for heating (back when that was done with a pile of wood), and minor medical needs. (Major medical needs the Jew would violate the Shabbath and do himself.)
Getting high is not a necessity, and the fridge switch could have been taped before the Shabbath.