Many conditions can cause learning difficulties and what we call today "global developmental delay", - injuries, infections, genetic problems. However, she was obviously relatively able to have been a ward helper and it is possible she enjoyed her role in the Workhouse with meaningful work and people with whom she could have been friends. The censuses are only snapshots of a person's life and she may have returned to her family for visits or even to live. Obviously having learning difficulties from infancy is a sad situation, but it does not mean your great-aunt had an unhappy life.