Like just about every other topic under the sun, this is about "it depends ..."
Corded tools have the (essentially) unlimited ability to run and never worry about running low on power. For repeated use tasks, that go on for hours, it's hard to beat this. Or, tasks that consume an inordinate amount of power for long bursts (drilling several large holes through 1" steel plate for example). In a production environment (think commercial manufacturing) this is a key concern; you need power for HOURS with little interruption. Here, corded tools make the most sense. Or, perhaps you have to cut many, many 2x4x8 boards, or cut lots of OSB. Here, the heavy amp draw over many long uses would deplete a battery quickly. Again - corded power makes sense. And if your projects almost always happen in one corner of your basement or garage, then the portability of cordless drills has little appeal.
Cordless tools have three advantages, but only if you are in a position to need the advantages.
1) No cord means complete freedom, and a FAR wider range of distance to provide service
(when I build pole barns, there is often no EL on site, so several charged batteries were sufficient. The barns are often hundreds of feet from a house and dragging an extension cord all the way over is not probable. Or, ever try dragging a cord across a steel barn roof as you're placing panels down? Now try it with three people ... You get the point. Other times I've been out trying to secure a fence at the farm, or doing other "power tool" tasks where I'd either have to drag a generator and cord, or just enjoy the simple essence of a battery tool!)
2) short duration tasks have less complexity.
(need a drill-driver or quick cut that will literally be all of 7 seconds or less of use? Why get out the cord when the battery tool is self-powered?)
3) no cords means no tangles and no tripping over cords (self-evident if you're running a large project and have several tools around the site, especially when on a roof, or such)
It is important to note that Lith-Ion batteries have greatly (and I mean GREATLY) improved the power and life-cycle of cordless tools and their ability to serve. My Craftsman C3 systems came with the "old" NiCad. They were OK, but nothing great. But luckily Sears saw the benefit of marketplace opportunities, and so they now offer all "new" tools with the Li-Ion units, and those same Li-Ion batteries also fit my old tools. So a few "new" batteries make my "old" tools "new" again! I have three large Li-Ion packs now and find I can pretty much do any task using one as one is in use, another in "stand-by" and the third perhaps charging, if needed.
So ...
Corded tools have their place.
Cordless tools have their place.
And that's why I own both.