The latter half of the 19th century saw an arms race between New York City legislators and the builders of slum-like tenements. The battleground: windows and fresh air.
The 19th century CE saw a huge influx of immigrants into the United States, and New York City was the destination of choice (or convenience). The enormous pressure on the city to find residences for all these migrants lead to the construction of large apartment blocks known as tenements. And the builders of those tenements wanted to extract every possible amount of profit from the residents.
So, they tried to fit as many people into as small a space as possible: huge buildings with hundreds of rooms all packed together without thought for things like air, space, and fire safety. These early tenements might have eighteen rooms to a floor, but only two of those rooms would have windows. As you can imagine, they were a nightmare to live in: cramped, dark, boiling in summer and freezing in winter, and a hotbed for diseases like tuberculosis.
New York legislators wanted to improve these conditions. They introduced a law in 1867 requiring every room to have access to a fire escape and also to have a window. And this is where the arms race begins: the next wave of tenements to be built had windows… but those windows did not lead outside. Instead, they installed windows facing inwards to the corridor between rooms.. This kept the same resident density, and did nothing to resolve the health and wellbeing problems for those residents. The score: tenement builders 1, legislators 0.
The next law arrived in 1879: those windows we required? Yeah, they need to actually lead to fresh air. The tenements built according to this law followed that rule, but they did so by creating extremely narrow air shafts. If you looked at the building from above it would be shaped like a series of dumbbells pushed together, with the air shafts being the small space between them (you can see a sample floor plan here: Old Urbanist). Your window might face outside, but that outside would be a hole in the middle of the building just three to six metres wide. Still very little fresh air or sunlight, and, of course, those shafts quickly filled up with garbage. Tenement builders 2, legislators 0.
It took the free press to finally get some traction: in 1888 a photojournalist named Jacob Riis visited the tenements, took photos, and began exposing the awful conditions to the rest of the city. His How the Other Half Lives, which began as a lecture series before becoming a magazine article and then a book, spurred the city to action. A 1901 law established minimum standard sizes for open courtyards outside the windows. At last, a point for the legislators.
Today you can still divide tenements in New York City between those made before the 1901 law (“Old Law Tenements”) and those made after it (“New Law Tenements”).