Tl;Dr: the resolution assumes square pixels, but the physical led pixels are rectangular
Longer explanation: Each pixel on the screen is built from 3 square LEDs next to each other. You can see a 4k screen under the microscope here: https://images-cdn.9gag.com/photo/aLMqjLM_700b.jpg And you can't put 3 squares in a square. So the physical ratio is different from the computed ratio.
The computed ratio comes from historical reasons when the screen was squared and green, and the can have to go from top left and scan the screen all the time.