The lack of backwards comparability is because of the large difference in architecture.
The PS2 was a128 bit custom processor, the PS3 had PS2 hardware in the original fat versions to achieve backwards compatibility, it was dropped to reduce the price.
The PS3 was a 64 bit (I think) custom PowerPC processor.
With the PS4 Sony switched to x86_64 processors making the console essentially a PC with bespoke custom hardware. The PS5 is the same but better speced components as the tech moved on. That’s why the PS4 & 5 are compatible, they are essentially using the same architecture.
Microsoft is a similar story but they went all in on emulation of their old consoles which is why only certain games are allowed, they only allow the ones tested to work with the emulator.