Wondering why they are rectangular rather than square.
Square seems logical. But logic is only a tiny part of the reason things are designed the way they are designed.
As already noted, there is an optimal length, within certain constraints, for lines of text. Maybe 7 - 11 words. Perhaps 4" - 8". I am sure plenty of people have done research on this. But the end result is that even in the days of big horizontal scrolls (I am thinking of Torah scrolls which go back thousands of years, and I am sure there are other examples), even though the scroll might be hundreds of feet long, each column was (and still is) comparable to a page of a modern book. Related to this, if you have a very wide page - e.g., newspapers - and/or small print, the page is broken up into columns.
Length is based on other parameters. One is materials. Since width is set based on reading ability, length is set based a little on reading (hard to read if the page is too long) but more based on handling (easier to carry if less than a foot or so long) and on manufacturing materials. That sets an absolute maximum of width x height (turning the parchment whichever way works best) based on the size of animals for parchment and based on manufacturing capabilities for paper. Paper can now be made really, really big without a problem, but before the industrial revolution that was not the case.
So without a clear reason to make books square, they typically (in Western society as I'm familiar with it) were - and still are - made 5" - 10" wide and 8" - 12" tall. But there is plenty of variance and you can make books square today if you want to.
Computer monitors are to some degree based on books. A "page" on the screen is comparable to a page on a book. However, technological issues get in the way - or at least they used to. The first generation of computer monitors used CRTs. These were originally circular. Logically, a square in the middle makes sense. There are two different ways of using a monitor - vector and raster scan. Vector monitors are relatively limited when it comes to text display and virtually all monitors today are raster based.
With a raster scan monitor, you have a series of lines and each line contains dots (pixels). There are different design considerations for the number of lines vs. the number of pixels, with the end result that "close to square" is good for manufacturing reasons (a CRT is effectively a section of a giant sphere, so a circle --> square is easiest to manufacture but it can and does vary quite a bit). That resulted in the 4:3 aspect ratio of most CRT TV screens (despite the different aspect ratio for film-based movies) and the same - or close to it - ratio was used for most CRT monitors.
Then we get to the LCD screen revolution. Technically plasma and other types of screens have the same flexibility, but from a practical standpoint LCD has been the dominant monitor type for many years now and most users went from CRT to LCD. (FYI, what are commonly advertised as LED screens are actually LCD screens using an LED for the backlight instead of a fluorescent tube. There are true LED screens in sports arenas and billboards.) An LCD is a grid of pixels that can be built to any shape desired. A lot of the earlier LCD monitors followed the 4:3 aspect ratio for compatibility. But as the technology got cheaper - and the monitors got larger - there were a few good reasons to shift towards a 16:9 (or 16:10 or similar) aspect ratio:
- High Definition TV, which includes compatibility with the aspect ratio of traditional film movies
- Laptops - A laptop can be made smaller and lighter by having a smaller screen. But that means less stuff on the screen AND a smaller keyboard to match. By using a 16:9 aspect ratio, you can have a screen that has a decent capacity and a width to match the traditional keyboard design but a little shorter - and lighter.
- Two-page displays - Instead of trying to match one page of text, a wide monitor can match two pages of text - good for reading but also for editing.
- Multitasking - One window for a browser, another for a word processor, etc. all on one monitor is much easier with a larger monitor, and because of the way the eyes work, this is better side-by-side than in a giant square (think about papers spread across your desk).
- For those who have a preference for extra-tall vs. extra-wide, many monitors (as well as most smartphones and tablets) can easily change orientation.
This is an excellent question.
First observe that whereas computer monitors are almost always oblong, the larger ones are usually landscape and the smaller ones are usually portrait. (Note the meaning of the word oblong: it means rectangular but not square.)
Why is this? Well on the larger monitors there is space to show, in the normal course of things, more than just a single window that contains lines of a nice reasonable length, which as others have pointed out is about 7-11 words long. In principle we could have the other items on our screen arranged in a column, below and above what we're reading at a given time. But
because our eyes are horizontally aligned it's easier to scan from side to side and therefore to position the other items horizontally; and
another reason is physical stability: wide and low is more stable than narrow and tall.
So monitor screens large enough to have two or more windows open most of the time are almost always landscape.
With smaller screens you tend only to have one window open and the main UX constraint is line length. So since you're not going to have anything to each side of the window, you might as well have as many lines on your screen as possible, hence the use of portrait.
There are also medium-size screens, and sometimes these have existed on a middle ground and been fairly squarish, for example the early computers made by Apple.
As for why books are usually portrait, the same kind of consideration has applied as for smaller computer monitors. You may find it interesting to have a look at traditional canons of page construction.
There is of course some leeway in design and it is not true that a book printed landscape is totally unreadable. Some books are printed landscape. But these tend to have a lot of pictures.
When there is only or mainly text, then given the constraint on line length and given also that you want as many lines on the page so long as you don't get so many that the book becomes unwieldy, it follows that the format to choose is portrait.
As for the specific question as to why more books haven't been square, further consider wieldiness. Books are bound along one edge and made to be opened flat. If they were square they would when opened be twice as wide as they were long, which may make them a little more unwieldy to deal with than if they were produced portrait. However, this would also suggest that books shouldn't be landscape, whereas in fact some books are landscape. Other parts of the reason for the rarity of square books may well be to do with printing technology and paper production. Thus it may be possibly be more economical to cut page sizes with the same dimensions as for portrait and then bind along a short edge, getting landscape, than to cut the pages square.