That's why it's important to assess the tone the DM is using when they say that.
Do they sound defeated? You're probably about to derail away from something planned to something that will have to be fully improvised on the spot, reconsider for sanity's sake
Do they sound excited? You're probably about to trigger a really cool trap, full steam ahead
I know a DM that created a fake puzzle room, and asked that for everything. They were in the room for an hour before realizing that the door was unlocked
If you have to ask if they're sure you've either not described a situation clearly enough, or you're giving them meta knowledge of an upcoming complication - and if you need to stop them from triggering a complication you shouldn't have put that complication there in the first place.
It's a popular and well known phrase, but it needs to be acknowledged that it's a crutch to make up for DMing mistakes that are in danger of killing a PC, not a way of protecting them. You shouldn't get to the point where you need to warn a player they're about to get their PC killed - if they are taking a potentially suicidal action they should already be aware and have made their decision based on it.
It’s a popular and well known phrase, but it needs to be acknowledged that it’s a crutch to make up for DMing mistakes that are in danger of killing a PC
You say that like if players always did good and reasonable actions even with every piece of knowledge in their hands
Oh, I'm not pretending that even the best players aren't a bunch of free range maniacs heart, it's just that it's rare that a player will actively choose to do something that is likely to kill them - They might set off a chain of events that digs them into a hole and leads to their death over a series of decisions, but if they're aware of what's going on they generally shy away from single "are you sure you want to do this" moments with a real risk of causing immediate death.
I love all the clarification questions the DM's ask. I remember one in particular:
Player: I climb the wall. What's there
Me: There's blah and blah
Player: I teleport down there
Me: You teleport down there?
Player: Yes....oh shit
Me: As you get to the ground and look around, you hear the crackling and rumbling that sounds like moving stone, looking up you see two statues coming to life, wings spreading out as the demonic statues gaze upon. You're by yourself. Roll initiative.
Other instances:
Player: I open the door
Me: So you grab the door handle-
Player: no wait!