Because when you increase the resolution you increase the number of pixels in a certain length.

If a UI box is 100 pixels wide then if your monitor was 100 dpi that would be 100 dots (pixels) per inch.

If you got a new fancy monitor that had 200 dps per inch. Then that box would be half an inch on your screen because the 100 dots that make up the box is shorter because the pixels are much smaller, in this case half the size.

It's the same with the UI. Some games have scaling features where they essentially magnify the UI. If you've ever watched a DVD on a very large TV screen you'll see little squares because the picture has been essentially stretched. That's what UI scaling does unless the developer has higher detail sizes for larger resolutions.