This case could have been decided either way. The result clearly depends on the makeup of the Court and the justices' personal inclinations. As evidence: a very similar question was decided by the Court in 2009, with a completely different result [1].
[1] https://ballotpedia.org/Massachusetts_v._Environmental_Prote...