Screens are visual, and human vision is biased to search lateral space over vertical space.
This is due to the nature of humans' visuospatial limitations. We're largely 2d animals in our movement: front/back & left/right, not so much up down. This is different from animals like birds and fish who constantly have to navigate all 3 dimensions to catch prey and avoid death.
We aren't ignorant of vertical space, but horizontal space is much more well attended to by the human brain, spatially and visually. (Video game designers encounter this problem in getting players to look up.)
Vertical screens for the masses started with mobile, because constraints of the hand matter more than the biases of vision in that case.
Of course as desktop screens become giant, lateral vs vertical space becomes a less important distinction, but understanding why "widescreen" came about over "square" is important. Of course, this all varies by task, but I imagine this is a big reason why 16:9 came about.