sys_metrics(0) and sys_metrics(1) represents the current monitor resolution (before the Engine starts).
video_set sets the engine window size.
You make the engine window the same size like the monitor size (ignoring the aspects) because you set the size BEFORE getting the aspect ratio.
Afterwards screen_size.y of cause is equal desktopHeight.