That's not entirely right; there are often multiple ways to deal with any given problem.
As ever, it's a "it depends" sort of situation, ha ha. I'm speaking more "generally" when I mean that. If you add systems/skills/etcetera to change how that works, then you'll get different results.
As per your example of deck building and dice rolls, that's one of the easier ways to change the system from "answering a question on the test" back into "testing how the player reacts and adjusts".
But, as a default system, it is very much "answer the questions on the test". If you change things around and add in features or skills or whatever, you can very much change its core identity into something else. You can change where its focus lies and in how "player skill" is measured by the Dev.
But, it depends on what the dev is trying to accomplish. What "feel" they want, and who their audience actually is.
Nothing we say is going to be "entirely right" as there are exceptions to rules, outliers, or just added details/information that can change what the question even is.
So, unless we're talking about a specific system and set up, I'm going to answer based on the system being "generic".
After all, your examples rely on the dev having coded skills to redirect attacks (among a few other things). If they didn't, you don't have that option.
For instance, if you know your guy is going to get attacked and possibly killed on the next turn, you can have them play defensively, try and use your best attack to clash with the attack, have someone else redirect the attack, try and kill/stagger them before that happens, or just give up and let them die and focus your efforts elsewhere (you do have other problems to deal with, after all). There's also resource management to consider, so sometimes you might not necessarily want to counterplay the enemy's every move.
The problem I think a lot of devs run into with design is that they think "possible options" mean "there are lots of options".
That's why "robotic play" tends to exist a lot. It's unintentional a lot of the time, but is the result of the way the game is designed.
Sure, you could have them play defensively. But, is that the most optimal thing to do? You could redirect an attack, but is that the most optimal thing to do? You could try to kill the enemy before they act, but is that the most optimal thing to do?
This is why such gameplay turns into "answering the question on the test". Because, if the answer is "yes, it's the most optimal thing to do", then it is the only answer. It is the singular correct answer to the situation or the enemy actions. Any other answer will eat up your resources, eat up your time, put you on the back foot in combat, etcetera. And, in a system where the game advertises to you what is going to happen, it is insinuating that skill lies in being able to take advantage of that information. So, if a player can't take advantage of that information... then we start getting into other issues. Like, the same sort that people who "hate RNG and missing enemies" would complain about. "You mean the only way I can deal with that is with some thing I didn't have at the time? Some card I didn't draw? Otherwise, I just have to shut up and eat it?". You would tend to get players playing a lot more "defensively" and "carefully" with such mechanics (like they did for Elden Ring when most of their bosses adopted such nonsense. It wasn't clear until nearly a year later that most of the really hard bosses in the game were meant to be tackled very aggressively with stance damage, which makes all those fights super easy... and it wasn't obvious because the game never teaches you that and provides a ton of methods for the player to "play safe" instead).
But, regardless of what choices you "can" make, if only one choice is "optimal", then it is "the right answer". The choice isn't a choice at all, at that point.
Would you rather wade through mud waist deep for 50 meters to cross the finish line, or walk 70 meters around the mud hole to the finish line? Which is the more optimal path? Is wading through the mud even an option at that point? Sure, it's presented as an option... but it's presented as the "you are an idiot" option.
Or, if you're a game player... it's the option where the game punishes you for not playing optimally.
So, we arrive at, "the gameplay is just asking you to give the correct answers to the test".
I'm just not particularly into playing games like that, or designing them like that. I prefer "thinking on the fly" to "preparing for a test". I value that more in terms of game design. I also think it invites more engagement from players and less "turn my brain off" type stuff.
But, that's just me.
I guess part of it specific to the example I mentioned might also be the deckbuilding and dicerolling aspects, so not all cards are always available all the time and you may not always know the outcome.
Hence why I said it depends. As with anything, it depends on context and execution. Even not revealing anything about the enemy can still make gameplay become "robotic" if all we're doing is "always be prepared for anything, heal/defend when low on health, etc".
Yep, if the combat system isn't designed very well, even in my preferred context, it becomes very robotic as well. But, I mean, I personally have taken steps to remove that sort of gameplay while keeping the core advantage of it. I want to design and play games where "there is no right answer" and there is only "the answer you chose to give is correct". Where the player's understanding of the game and clever usage of the tools brings them victory, rather than just having the single optimal answer to the problem.
But, for me, the difference in systems is that one inherently has an advantage toward providing that particular type of gameplay. The other doesn't. The other needs to be heavily reworked and modified in order for it to not be what it is, and to be something else. You know, like your deck building example. Or the dice rolling. At which point, we've got a heavy element of luck involved, and in whether or not the game even gave you a counter or an option to tackle the particular problem. You could have 10 cards that could counter exactly what the enemy is going to do to you... but if they just so happened to end up at the bottom of your deck, and completely inaccessible... then you are unable to give any "correct" answer to the test.
And, when the dev is communicating to the player what the enemies are going to do, it is with the silent expectation that the player do something about them. If the player cannot do something about that information, then what good is having that information to begin with? Just to advertise to the player the unfair situation they find themselves in and can do nothing about? That certainly doesn't feel very good to players.