The two do NOT do the same thing. Yes, I suppose you could rig them to do similar actions, but they provide very different functions.
Driven keys are pretty much equivalent to an 'if-then' statement. It allows certain sets of motions to automatically happen when the conditions are met. Like in the tutorial, a door opens whenever an object gets close to it. This has a large number of applications, which include things like dials and so forth.
Adding a custom attribute allows you to do literally almost anything. You can use the attribute to control visibility, for one. In fact, you can use a custom attribute to control whether or not driven keys are evaluated. There are many possibilities.
There's that explanation. As for using them... it just varies. Some things will work better in one situation in another, and there are probably a number of times when a combination of the two must be used. Unfortunately, its rather a case-by-case thing...