There are two main reasons why glass is still preferred over say PMMA.
The first is durability. As long as it isn't broken, the glass in a window can easily last for hundreds of years in good condition. In particular it is a lot more resistant to scratches than comparable plastics and isn't really subject to much in the way of environmental degradation. Windows are very prone to getting scratched when they are washed as they accumulate small particles of grit on their surface which gets rubbed around the surface during cleaning. Even with scratch resistant coatings no transparent plastics get anywhere near the hardness of glass.
Most glasses are also much more resistant to environmental degradation from sunlight and various chemicals in the environment. Even the most resistant plastics start to discolour and become brittle over time.
The second factor is stiffness. Glass has a much higher Young's Modulus than PMMA. In bottles etc which are stiffened by their shape this doesn't matter much but, as windows tend to be large, flat, thin panels stiffness is a big issue, affecting their ability to be sealed into their frames and their optical properties. So a plastic window would need to be substantially thicker than a glass one to have the same stiffness with consequences for optical quality and cost.
There may also be issues with gas permeability in the context of double glazed windows.
In addition many of the safety concern raised in the question are addressed by laminated and tempered glass. Tempered glass is heat treated to control internal stresses, making it significantly stronger than float glass with the additional benefit that if it does break the entire plate fractures into small granules rather than sharp shards. Laminated glass consists of alternating layer of glass and a polymer film, producing a composite sheet with very high strength and toughness, potentially to the point where it can be usefully bullet resistant.
Another aspect of this is that side and rear windows in vehicles are often required to be made from tempered glass for safety reasons as they can be safely broken to allow access and extraction of passengers in an accident if doors are jammed or inaccessible.