I think the more general issue is that a winning strategy for you from a position P assigns each possible position where it is your turn some specific move, such that if you start at P and follow that strategy then you will win no matter what moves your opponent makes. A checkmate type of puzzle essentially asks you to find a winning strategy, which means that your strategy has to work against any possible opponent moves. Theoretically, you would have to analyze the entire tree of possibilities from the given position, since after each move the other player typically has multiple possible moves. It is nevertheless usually the case that only a few lines of play (i.e. paths down the tree) are interesting, because it is hard to find the winning moves along that line, or it is the longest the opponent can hold on before losing, or some combination of those factors. Furthermore, if it is a checkmate-in-k puzzle where k is not too small, there is no hope of being able to list out all the possible lines, so one has to select a few to show.
If you try Lichess puzzles, the website only chooses a single possible opponent response against you, so technically it is not enough if you manage to reach the "you have solved the puzzle" state, because you only showed that you succeeded along one line. To really solve the puzzle, you must convince yourself that you can achieve at least as good an outcome in all possible lines of opponent play.
Similarly, the puzzle solution you quoted here merely showed one line, obviously assuming that you should be able to find the winning strategy in all other lines not shown. Saying that "should I expect black to ..." is simply erroneous, because solving this puzzle requires you to know how to win no matter what black does!