For the same reason that NIMBYs care so much about urban trees or spotted owls. They don't actually give a shit about them, they just are willing to say or do anything to sabotage the process of increasing housing supply.
Being a NIMBY I want to live in the neighbourhood I bought a house in, not the one someone who can leave with a months notice feels like turning it into.
I'm as big a YIMBY as you'll find, and urban trees are really important to making a city a nice place to live. There's no contradiction to those positions - just, you know, build more housing and plant more trees. (Spotted owls, of course, have nothing to do with urbanism, so I don't know how they got dragged in here.)