Markets are rational over the long run but who cares since we're all dead, as Keynesians would say. I still prefer the invisible hand.
It is not enough to identify a malfunctioning market, or a market failure, and then call for action (usually by the State) to correct it. One also needs to loook at whether that action will make the problem of failure worse.
Yes, one needs to very carefully look (or loook) at the costs alongside the benefits to gauge the policy's effectiveness. Many people are simply mesmerized by the benefits and, when the policy is implemented, are shocked by the incredible costs.