All you have to do is look at the final effect, Z. The stated purpose X may or may not be the intended purpose Y. Even if stated purpose X genuinely = intended purpose Y, the actual effect Z matters the most. You're spot on.
What's odd when seeing my comment get down-voted to oblivion is that I am not making a value judgment about the laws/policies, simply mentioning that many of the ones listed have unintended consequences when it comes to housing affordability.
As usual, downvotes are used instead of a counter-argument because whoever does it lacks the sophistication required to offer one :)