Let's face it - it's extremely hard to keep your mind at some particular target for prolonged stretch of time without getting your attention diverted. Even if you take measures to protect yourself - by retreating to some hushed place, for instance - the mind keeps racing, only just you are being distracted from within.
This might not be an issue for the majority of people - after all, our life is comprised of many activities which have to be done swiftly and it's not necessary at all to ponder at some task you've done million times before. Yet for someone who is tackling a complicated problem or trying to learn a difficult topic, distraction is costly - getting back on track isn't something you can do by snapping your fingers. I certainly wish I could take a snapshot of everything in my mind before talking to someone and then immediately roll myself back into it after the conversation is over.
Attention is akin to a muscle in a sense that it could be built. The stronger it is, the longer is your ability to focus. The longer you can maintain focus, the more quality progress you can make in whatever activity you are engaged. Powering through a tough spot in a problem or task at hand instead of backing down (which is an innate response for the majority of us) might be one of the best exercises out there. You are unlikely to arrive at a solution straight away as it usually starts to click after few intermittent attacks - but that definitely pumps the focus muscle a lot.
The ability to maintain strong focus opens up a lot of opportunities for both personal and professional development and more often than not unlocks useful insights. Undivided attention is one of your most valuable assets. Nurture it, guard it. And as with any scarce resource, spend wisely.