NIMBYs don't win all the time.... And in a lot of places they do have near total control.
NIMBYs are usually suburbanites, and if they're in a smaller municipality they can exert a large amount of control over the city government and planning process. The auto dependent single family suburb has been heavily propagandized and ingrained in American culture that many times no one questions it, and those advocating for some walkable, or mixed use areas are in the minority.
Just look at California, the state requires every city adopt and update a multipart plan for various purposes. One of those parts is called the "Housing element", it requires cities to plan and zone for a minimum amount of growth and affordable housing. over the last year or two many of these plans have come up for renewal and lots of the smaller (and especially more conservative) cities have been reluctant, or out right refused to meet the states requirements. They want to keep their car oriented suburban small community, affordability be Damned.
The state did pass this fun law that created this thing called "the builder's remedy". Where if a city does not have a compliant housing element the city loses its discretion and must approve any permit that meets its building code, sans any density requirements. And these rights vest, so even if the city latter approves a compliment those builders can still utilize those permits. (Carrot and stick approach to getting cities to comply)
But this is only after decades of the California housing affordablility crisis growing and yimby advocates fighting for less restrictive zoning.
https://openscopestudio.com/californias-zoning-holiday-what-...
TL;DR NIMBYs are ussally the majority (or at least the louds and most engaged).