I think that for single-book stories, the RULES are initially set by the GENRE but eventually also by the author’s STYLE.
I think that in multi-episode stories, there are rules intrinsic to the story. They may not always be apparent by the end of the first episode.
When people break RULES it makes the story shocking and unpredictable. But sometimes when the RULES are broken, they still secretly follow RULES that have not yet been communicated.
Some people claim they like and prefer when RULES are broken. Perhaps they do. I do wonder if they are instead applying RULES that come from another source and if there IS a way to unpleasantly shock them. Without making them say ‘this makes no sense’ and stop reading.