In the early days of aviation, planes had rectangular windows. However, As planes became more advanced they were made to fly high and at faster speed. As a result, cabin had to be pressurized to ensure that the passengers are comfortable. A pressurized cabin required cylindrical shape in order to work properly. If that window is rectangular, pressure of air can smash the glass and crack the plane body.If the window is rounded, stress levels are evenly balanced out.
Unfortunately, it took two airline crashes before it was realized to replace rectangular or square windows with round ones !!!