And the root cause of NIMBYism is the public goods dilemma. Everyone would benefit if more housing were built, but nobody wants more built near their land.
The solution is not as simple as "Just stop electing NIMBYs!" because NIMBYism is a Nash equilibrium.