Deployment experience has shown that sometimes a user can appear to be an occupant in a room even though the user's real JID has gone offline since joining. Such users are called "ghosts".
This problem seems more apparent when Openfire is running in a cluster, with users that join from remote domains (through federation/s2s).
XEP-0045 "Multi-User Chat" describes best-practices to detect and remove ghost users. These should be implemented.