You can see by how the beach grass is planted that Cape Cod National Seashore is trying to control the erosion of the beaches.
“Planting beach grass on Cape Cod is one of the best natural ways to prevent land loss due to erosion in beach communities. While it may seem out of place at the beach, it’s been intentionally planted on US beaches since the 1700s to help prevent erosion.”
Beach grass helps prevent coastal erosion by stabilizing sand dunes on the beach. The beach grass achieves this by acting as a natural fence and having deep roots.
A very tough plant!!
“Beachgrass also tolerates salt spray and occasional wave overwash, drying winds, low nutrients, heat, and excessive sunlight, and grows well in sandy soils, making it ideal for coastal use.”
https://www.mass.gov/info-details/cz-tip-dune-building-with-beachgrass