With a pawn on the seventh and the enemy king in the corner next to it, promoting at once often stalemates or loses the pawn; first take the king one step to cover the queening square.
White's pawn stands on b7, the black king on a7 and the white king on c6. The queening square b8 is attacked by the black king, so 1.b8=Q+? simply loses the pawn to 1..Kxb8, and the game is drawn with bare kings. Promoting to a rook or bishop fails for the same reason, and a knight on b8 is just a knight that will soon be lost.