To me there are two aspects of any task assigned to a developer in a software project. These are not exclusive so a task can be (for example) 40% aspect 1 and 60% aspect 2:
- Task requires you to learn new things, or improve your existing understanding on them. Doing this will improve you as a developer and gained knowledge/experience is transferable, either to other areas in the same project or to other projects.
- Task is very specific to the project or even to one very small area of it. Doing it may only improve you as a particular developer on that project. Even then, gained knowledge/experience is only useful in that specific part of the project, therefore useless unless there will be many tasks in the future focused on the same part.
I don't have a problem working on tasks those are 100% number 2, since they are part of the job, but when there are other team members who worked a lot on these specific areas, me doing them seems like a waste of time and resources for everyone, which absolutely kills my motivation. Especially in a project close to finishing and there won't be any more tasks regarding those areas.
This may be useful to disperse knowledge among the team so if someone quits, others can take over, but anyone can spend a few days to figure out a code, doing it upfront is paying for some accident that didn't happen yet or may not even happen ever. If you do this now you just guarantee paying the cost.