From an engineering viewpoint, they are a real pain; it would be far better to have none. This would result in a stronger structure for a given weight (or should I say mass?). However, the SLF prefers to have a window and they buy the tickets which pay for the aircraft. Therefore, you have windows but as small as you can get away with. You also have rounded corners to prevent/mitgate against stress points in the cutout.
PM
(And then you find that there is only one manufacturer of windows in the world (I don't know for sure how many there actually are) and they only make shape X. Guess what shape you'll be fitting!)