During its lifetime, it was tasked with scanning the memories of the visitors who came to the planet for recreation. The planet's machinery would create the objects that the visitors desired. The Keeper oversaw operation of the planet for many years, but when the USS Enterprise visited in 2269, they discovered the caretaker was dead.
The computer had massed a vast intelligence from the many visitors whose minds it had scanned over the years, and wanted to escape the planet. It hoped to take control of the Enterprise, who it thought was the master of its crew.