The main reason is because that generation has all the GREATEST games, and the greatest library in general, IMO.
Burnout 1, 2, Takedown, and Revenge
Devil May Cry 1, 2, 3
Final Fantasy X, XII (maybe not the best gen for FF, but still)
Gran Turismo 3, 4
God of War 1, 2
GTA 3, Vice City, San Andreas
Hitman 2, Contracts, Blood Money
Jak 1, 2, 3, X
Katamari Damacy, We Love Katamari
Kingdom Hearts 1, 2
MGS 2, 3
NFS Underground 1, 2, Most Wanted, Carbon
Prince of Persia SoT, WW, TTT
Ratchet 1, 2, 3
Resident Evil: Code Veronica X, RE4
Silent Hill 2, 3, 4
Sly 1, 2, 3
SMT Nocturne, Digital Devil Saga 1, 2, Persona 3, 4
Soulcalibur 2, 3
Tekken 4, 5, Tag Tournament
... and so on. Many of these series had their best games on the PS2 generation. Many were so good, they were remastered for the PS3 and the PS4.
The PS3 had a great library, but In my opinion it doesn't compare to the PS2's. In terms of hardware, the PS3 was probably the worst. The developers have often said that the PS3 was difficult to make games for. For example, Kazunori Yamauchi has said that GT5 took so long to make because of it. Also, the multiplatform games often looked better on Xbox 360. The PS4 is great in terms of hardware, and the games are awesome, but the library is still not as good as on the PS2.