Jesus certainly understood the connection between personal habits and quality of life, which is why he watched his behavior closely during his 40 days in the desert. He made a set of choices that can become habits for us and change our lives for the better. Although Jesus didn't write a program for our smartphones, he did give guidelines and social support for resisting temptation.
Luke tells us that Jesus was tempted for 40 days by the devil, and during that period Jesus ate nothing. When those days were over, "he was famished."
The devil says to him, "If you are the Son of God, command this stone to become a loaf of bread." Notice that the devil is making a reasonable request here: Jesus is, in fact, the Son of God. He certainly has the power to turn stones into bread. He is famished, and a loaf of bread would give him energy to keep on serving God.
But Jesus says no, because he is in the habit of trusting God, not himself. If he performs this miracle, he will be serving his own needs instead of allowing God to provide for him. And so he responds to the devil by quoting a line from the book of Deuteronomy, the same verse that reminds the Israelites that God provided them with bread in the wilderness: "One does not live by bread alone." Instead, we are to live by trusting what God says and does.