Most definitions of games will say something to the effect of “an interactive system of rules with a goal”. You have some sort of win condition you’re tying to achieve or at least a lose condition you’re trying to avoid, and you have to interact with a set of mechanics to improve the gamestate. The implication in this is that the fiction that gets overlain on this is useful for communicating the game-state, and creating context, but isn’t strictly necessary to play the game. If you understand the rules, you can use those rules to figure out how to win.
There is, however, a class of challenges that often occur in games where the solution isn’t based on any sort of defined ruleset. Situations where a certain pre-defined action has to be performed at a certain place or time. Point and Click Adventure games are almost entirely made out of these sorts of challenges. The only rule at play is “show the right item to the right person, or select the right dialogue option in order to proceed”. The actual solution to the problem is to understand the narrative context surrounding the decision. The story dropped hints that character X needed item Y. If you stripped away the fiction of the game, what would be left would be at best a random chance that you do something right, and at worst nearly impossible.
The mechanics at play in something like Phoenix Wright don’t constitute the challenge, they just facilitate the actual challenge, which is not itself mechanically based. You aren’t manipulating a system to achieve a goal, you’re understanding a story to come to a conclusion about that story.
Contrast this to a mechanical puzzle, for example a block-pushing puzzle or something like Tetris. You can figure out the solution solely by understanding the rules that govern the interactions between objects.
There are also many games that contain a mix of the two. Think about how much of a Zelda game you’d be able to play if it were in a language you don’t understand. Think of how much of it you wouldn’t be able to do. Combat and block puzzles would lose nothing in translation, but delivering Zelda’s note to the guard in Kokariko Village would be a frustrating effort in trial and error.
I don’t want to get into the “these things aren’t games” argument, because I don’t think that’s particularly productive. But it is interesting to see that a large subset of games can’t be played through an understanding of their rules alone, but rather by understanding the fiction of the world, and coming to a predetermined conclusion.