Why do we include actions even on nodes which will not be reached if the strategy is followed, while defining the pure strategies of an extensive form game?
Think about a player (female) that moves first and is considering the profitability of deviating. Let's say that according to the strategy she is supposed to play action $x$ and then the second player (male) is supposed to play action $a$. It will not be correct for the first player to think that if she instead chooses $y$, the second player will necessarily still play $a$. Remember this is a sequential game, so after seeing that she chooses $y$ instead of $x$ player 2 can also deviate to some other action, say $b$. Therefore, by specifying the actions that each player will take in each node (even in the ones that are not supposed to be reached according to the strategy) we completely specify the strategy of each player, and can correctly check that no player has profitable deviations.
In fact, in many games, the only reason why the player that moves first chooses an action $x$ is because of the response of the other player after observing $x$, and the knowledge that choosing something else will also affect the decisions of other players, etc.
In a practical example, if you are playing chess and consider moving your queen to get one step closer to eat an important piece of the other player, you must anticipate they will react to this movement and protect their piece, or attack something more valuable of yours, etc. This is why when thinking about the strategy of the other player you must consider how different they will react depending on which piece you move next and to where.
BTW, chess is really hard to fully specify as a sequential game precisely because the number of possible nodes is massive, and properly specifying a complete strategy for each player has proven extremely hard. However, hopefully it gave you some insight of why actions and strategies are not the same things in an extensive game.