Microsoft maintained backwards compatibility across Intel+Nvidia, IBM+ATI, and AMD+AMD so it's possible. Sony hasn't invested as much in compatibility, instead just keeping the same architecture for PS4/5.
PS3 compatibility on the PS4 was notably absent, though.
They could include a software emulator at least for the PS2 (not PS1 because afaik the drive in the PS5 does not read CDs) on the PS5 and let people use old discs, but they don't and instead sell again old games packaged with the emulator in their online store.
Sony does something similar I believe with their new Classics Catalogue as part of their most premium PS Plus tier.
From 360 to Xbox One there was a similar situation where they would patch individual games to work, but because it was at least partially emulated, publishers had to sign off on allowing their game to be backwards compatible.