This is helpful, I didn't really understand how it works. So what you're saying is, designers / developers already work in "high-res" space (like 5K 5120 x 2880). And the image quality is native. You just get to see it in its "full glory" on a 5K monitor. And the "Looks like 2560 x 1440" is mostly related to fonts and text "sizing".
Complicated.
The LCD panels themselves never change their physical liquid-crystal-display windows (they are tiny LCD devices that variably dim) or layout. This is unlike the old days of cathode ray tubes where the actual scan line frequency could change.
So if an LCD (or for that matter OLED) display never really changes, what does?
The user interface is changed. I prefer the term "zoom" over Apple's choice of "looks like" in the System Preferences panel.
macOS has built into it large libraries for the graphical user interface and application developers use these libraries to do everything you see on the screen.
When you change the System Preferences display setting to a "looks like" setting you are telling these operating system routines how large to draw whatever on the screen.
This takes considerable processing but modern chips (like the M1/M2/M3 family) have the capability to do this processing readily.
However, since the beginning of computer graphics on displays with discrete elements ("pixels") the challenge has always been how to draw lines at any angle and not make the line look jagged, or stair stepped.
Apple's decision a while back is to only sell displays in which the individual physical pixels are so small that the human eye cannot discern individual pixels at usual viewing distances.
And this is why Apple's computers have displays with 218 pixels per inch. The iPhone has higher density, but phones are held more closely to the face.
Downside of Apple's decision: if you use a Mac with a display that is much less than around 218ppi then you will see the individual pixels at normal viewing distance. Hence people complain about said displays not being as "sharp" as the Apple displays.
As for text: in System Preferences you will be given a choice for scaled (i.e. zoomed) user interface settings. The default setting choices are the best because all the fonts are natively designed for those settings. The optional settings require items like fonts to be adjusted, and if your display physically is less than around 218ppi you will notice that the adjusted (scaled) text does not look as nice as the native settings.
If your eyes are good enough... and you sit close enough.