In short, as an employee (or manager or whatever), you should be valuable but replaceable.
If you're too irreplaceable, then you're really not training, mentoring, and documenting sufficiently. This is a great way to make a treadmill that it's really hard to get off; do you really want to be the guy who can't go on vacation because things will fall apart? If you're that guy, you also can't get promoted - that's what they call a double-edged sword! You should be helping others learn to do the things you can do, whether that's your peers, your subordinates, or even your bosses. Documentation also goes a long way here. It may not be as good, but it'll be good enough.
If you can walk away with no prep and no consequences, that's a sign that you're either not very busy or that you're spending as much time documenting as doing. If you're not very busy, well, let's hope there aren't layoffs coming! If you're spending as much time documenting as doing, then your work pattern may not allow for experimentation. Be mindful that sometimes you'll head down a wrong path before you head down a correct path. In those cases, overdocumentation every step of the way doesn't help; it only slows you down.
Ideally, walking away should take some preparation but be something that can be done cleanly. Usually, before you're gone, you'll have to do a few things:
- Pick an alternate contact. In the "wow this can't wait" moments, who else can someone work with? If you don't pick someone, they will - and it might be you!
- Get everything to a good stopping spot. Your projects may not be done, but they at least should be in a stable state.
- Document next steps. This isn't the same as documenting everything, but at least let someone know about the current state of your higher-profile projects. That way at least a status update can be accomplished.
- Don't tell people you'll be available. If you have to be, then you have to be, but this should be a bonus, not something that people ought to rely on.
* Translation: I've heard this from numerous places and I'm too lazy to actually go look up the original source.