The state’s energy crisis didn’t come out of nowhere: It took decades of deregulation to make it happen.