There are nice aspects of energy codes. For one thing, potential renters and buyers have little insight into how efficient a house or apartment really is. Since landlords and builders aren't paying the utility bills they are incentivized to reduce upfront construction costs at the cost of higher utility bills (and environmental damage) going forward.
If these codes are effective then they might be worth the increased construction costs. I'm not necessarily saying that they are (I don't know, maybe California's code is filled with frivolous, ineffective details; the article doesn't really give any examples) but I think just the fact that they increase upfront costs doesn't actually mean they aren't a good idea.