Because there are states where a majority of citizens do want it. At least they think they do, but they won’t when they find out how much it costs them, and how it will cost them in the lower quality of medical care they get. The ruling forces them to recognize those costs. If he just killed it, these leftist states would never get the chance to find out for themselves and learn from their mistake.
I understand your theory, but being a liberal means never learning from mistakes.