that's not technique so much as black being helpful. It's not especially helpful for beginners to see white checking the king in the middle of the board and getting a checkmate out of it. The king could dance around all day and it would be a draw. This happens all the time in scholastic chess. White would be much better playing something like 1.Qa5, or 1.Rh5 and squeezing the king up the board and squashing him against the edge.