Why do you dream the dead person was searching for something? People are often told its because they had unfinished business on earth when they were taken away. So they returned to search for that something which was their incomplete task.
Another way of explaining this is that the dreamer knew about the deceased having unfinished business before they died. So maybe the conscience of the dreamer was getting to them and the brain invented this dream. Maybe the dreamer’s conscience is gnawing at them, trying to suggest they should take over the task of completing that unfinished business. This may give peace of mind to the dreamer.