But the job of the manager is by definition to assign tasks. A bad manager doesn't delegate and tries to do everything herself. Not doing a task you agreed to as some sort of petty revenge or to teach a lesson is incredibly unprofessional. Just don't accept the task to begin with.