Fun seems like a pretty basic concept when you're talking about games, but it's not always clear that everybody is talking about the same thing when they use the word “fun”. For example, when you hear a good joke it's funny but is it fun or are those different things? In some cases it seems to me that different people may have incompatible ideas about what fun is, and that tends to get displayed in discussions about tabletop RPGs.
Some people believe that the experience of “fun” happens when your preferences are satisfied: there are some things that you like, and it's fun for you when you get those things. For example, most people like to win, so getting a victory in a game is fun. Or another example, most people like novel stimuli, so seeing the lights and hearing the bells in a pinball game is fun. Others argue that fun is more like a specific sensation: you experience it when you interact with systems in certain ways. You experience heat when you immerse your hand in hot water, analogously you experience fun when you immerse your mind in a game. For example, people can have fun playing a logistics organizing game like Factorio even though in a normal context organizing a factory would generally be considered work rather than fun. In this theory fun is one of multiple positive sensations: The delicious taste of good food is a positive experience, but it's not fun, it's something different.
Can rules get in the way of fun?
In discussing tabletop RPGs, some people subscribe to the theory that rules should not “get in the way” of fun, and that the ideal set of rules will recede into irrelevance so that fun can be the center of the activity. This is fundamentally a “preference satisfaction” sort of idea: people want something (maybe “a satisfying story”) so if you're ever in a situation where the rules say to do X but doing Y would result in giving someone what they want you should do Y so that they can have fun. But from the perspective of the system-sensation theory of fun the idea that rules can “get out of the way” seems as strange as thinking that your car can “get out of the way” of your driving: a game is largely made of rules, without the rules there's no game to engage with, so there's no sensation of fun, just like you can't drive without a car. (Now it's certainly possible for some games to not actually be fun when you use them, just like not all cars are drivable. And it's also true that not all parts of a system need to be formally-expressed rules).
Fudging dice rolls
One of the classic controversies in tabletop RPGs is whether a GM should “fudge” dice rolls by rolling behind a screen and lying about the results “for the good of the story”. The idea is that 1) people like to think they're manipulating complex rule mechanisms, and 2) people want the “right” results, so you square the circle by manipulating things under the hood so that people have the illusion that their manipulations led to the results and they get both things. It seems that there are two big problems with this. First, from the process-theory viewpoint, if the fun genuinely comes from meaningfully interacting with the system, then discovering that some of the mechanisms in the system don't actually work on the basis you thought they did will be deflating. Second, from the preference-satisfaction viewpoint, it assumes that the person doing the fudging has a good idea what the “right” results should be, even though it's really hard to tell what other people want (witness how stressful people find it to buy gifts for people, and how many social mechanisms we have in place to try to alleviate that, such as registries and wishlists on one side and the practice of training children to express gratitude whether they like a gift or not on the other).
Is there a preference-theory hiding in the process-theory?
Generally speaking I'm partial to the process-theory of fun. I think fun happens when you're making meaningful contributions to the game-state on a moment-to-moment basis (and I think this is true whether you're playing a board game like chess, where your contributions are the way you move your pieces, or an RPG where your contribution can be your character saying or doing something in the fictional world). If the system that I think I'm playing disappears out from under me (such as if I learn that the GM is fudging dice, or using a technique like “whatever solution to the mystery that the players guess is the correct one”) then my fun disappears, too. But isn't that saying that I have a preference for this particular metacognitive sensation and that it's only fun for me when I get hits of that sensation? Yeah, maybe. That's why I have trouble fully committing to the process theory.