AIs have representations of the training data, but they also do search. Search creates new knowledge. For example, a chess program doesn't have a representation of all chess games, but can search and in doing so create new games. This isn't (just) random generation, but generation constrained by an evaluation function.