Anna appears to be a kind and caring figure, trying to help Rachel move on from her grief and trauma. However, she is later revealed to be a figment of Rachel's imagination, a manifestation of her guilt and denial over Anna's death.
The movie uses the concept of an uninvited guest to explore themes of grief, trauma, and the power of the mind. The "uninvited" person, in this case, is a representation of Rachel's inner turmoil and struggle to cope with the loss of her sister.