What has been largely unknown is why.

In what officials have billed as one of the most ambitious programs of its kind in the United States, New York City has, with little fanfare, embarked on a roughly 20-year, $2.4 billion project intended to protect local waterways, relying in large measure on “curbside gardens” that capture and retain storm-water runoff.

Begun as a pilot program under Mayor Michael R. Bloomberg — about 250 of the gardens are already in the ground — the initiative is set for a major expansion that will bring thousands of gardens to neighborhoods across the Bronx, Brooklyn and Queens in the coming months.

The goal, according to the city’s Department of Environmental Protection, is to soften the “impervious urban landscape” of asphalt and concrete and absorb rainfall that might otherwise funnel into the combined sewer system. (During heavy rain, storm water can exceed the capacity of the city treatment plants. Overflows are discharged into local waterways to avoid flooding the plants, which can harm water quality.)

Any aesthetic benefits from the gardens are effectively seen as a bonus, though officials from Mayor Bill de Blasio’s administration noted that plots would be placed in many neighborhoods with a dearth of trees and above-average rates of asthma among young people.