The plot in the games does not lend itself to being directly adapted into an anime since it hinges on developing a group of three of the idols at once. As far as the game is concerned, the other idols don't really exist. They pop up on occasion when you have the opportunity to invite others to encores and 5-person songs.
The core concepts and themes for each idol are derived from the games but the precise events are entirely new. Furthermore, the anime is filled with fanbase Easter eggs and references to interactions that the seiyuu have with each other. In fact, many traits of the idols are based on their seiyuu.