"The secret to life is knowing when to leave." These kinds of statements don't have a specific name, but at worst they could be called clichéd advice. At best, they could be called memetic wisdom. These popular wise-sayings could be heuristics for great life choices.
Everybody parrots statements like these as advice, no matter the speaker's relationship to you. You could be talking to a stranger or a close friend and say, "I don't know, I'm thinking of quitting my job." When they reply, "The secret to life is knowing when to leave," you are likely to feel a sense of epiphany, authentic or not. This is part of our social behavior. We get swept up in conversations, especially ones that involve life problems, and the participants become invested in a solution. When they arrive at standard advice, everybody wants to feel changed and move on.
The advice-giver repeats these statements for all sorts of reasons. Maybe at some point in their life, the words resolved a life problem. Or the words are just safe, comforting filler. Dishing out standard advice quells anxiety. A conversation that over-analyzes work problems is painful, so when a wise-saying concludes it, the saying becomes associated with relief. That relief could be false if the association is simply because of social dynamics, where the group decided the topic was concluded. Or the relief could be true if an actual lesson was learned.
How can simple words solve people's problems? Most vexing decisions are complex, and while they may have simple solutions, the problems are often unique to that person's situation. Canned statements can't possibly have any value. And yet we've said these things a million or a billion times. And it's these statements, not others, out of the infinite number of things one could say, that we choose. The fact that we repeat them is because we believe they have value.
If there are only a few major categories of life problems, such as relationships, work, and health, then we could probably count the number of pieces of standard advice per category on one or two hands. It's possible there are just a few simple patterns in solving big problems, or it could be that society only has room for a few wise memes.
Here is an analysis of standard advice, assuming it is memetic wisdom: "The secret to life is knowing when to leave"