That would be the single most important lesson I've learned from playing D&D, and it applies to other activities in life. Let me elaborate.
When I'm working, I'm working. When I'm writing, I'm writing. When I'm playing D&D, I'm playing D&D.
A lot of gamers lack commitment, they play D&D with one foot in. They do it for many reasons--maybe they don't know the other players very well, or maybe they'll think the campaign will fold soon. They'd rather talk about politics. They surf the Internet during the game. They chronically show up late. While there's other priorities out there that certainly surpass D&D, they don't give the game the priority it deserves.
Playing D&D matters, because its an opportunity to shut out life's problems, play a character in a mythical world, and just have fun with a group of friends. Its escapism, pure and simple. But it's colaborative.
A player once told me that my Sunday afternoon game was the only time she could relax--she was a full time student with a full time job. The game has helped friends with PTSD by giving them something else to think about. Years ago, D&D helped me get out of a depression when I realized I was playing it way too much.
Yet you must have a certain amount of discipline to play D&D and keep out the countless distractions that beg for your attention. You're sitting down and interacting with a group of people for an average of 4 hours per session. A lot of people can't do that.
The DM has to spend additional time, often alone, developing adventures and a campaign setting. A lot of people can't do that either.
This discipline has translated over into other aspects of my life.
Playing D&D can help make you a better, dare I say "enlightened," person. Just read this article. And this article. And this article. The list goes on.
Playing D&D matters. Remember that. It matters to you, those around you, those who came before, and those who'll come after. If it didn't, then it wouldn't have lasted for 40 years.
Happy 40th Anniversary Dungeons & Dragons!