It’s not only about pixel density, although that’s important. Most importantly, 5k gives you integer scaling for a resolution of 2560 × 1440, which is perfect for 27 inch. If you can get similar results with another setup I would love to hear about it.