Affordable housing used as an incentive or way to overcome other barriers to housing (density limits, height limits, zoning etc) that makes the market more “free” net is will produce more development.
You don’t need it for development but it can be used effectively depending on other policies. As with all things it depends on what policy makers are optimizing for. These are all tradeoffs. But affordable by itself all else equal limits developer upside and incentives less development meaning less supply and higher prices.