Just like the PSX and PS2 before it, the PS3 is there for a cheap console that already has a solid library of games that can't be played on the PS4.
With the PS360 almost being as powerful as the Wii U, the Wii U's biggest rival isn't the PS4 or Xbox One, it's the PS360. If someone didn't own any consoles and they wanted something cheap, the PS360 are cheap and offer a large amount of great games, compared to the more expensive Wii U with less games.
Additionally, keeping the PS360 alive keeps third parties happy. Instead of releasing just PS4 and Xbox One games, these developers can release to a console with a large install base, guaranteeing more sales. This also keeps fans who are not ready to move onto new consoles happy as well. Still play new games, maybe not ones on the next gen consoles, but new games nonetheless.
Now the PSP on the other hand, I do think they should kill off. The PSP is dead everywhere but Japan, but even in Japan it's not really selling well any longer. The problem with keeping the PSP alive is that there are exclusives for the PSP which may have the chance to be localized if developed for the Vita, and then there are those Vita/PSP multiconsole titles, so for those in Japan, why buy the Vita when you can play almost every game released on the PSP as well?