because US has many states and in some states, the highest court ruled than gay marriage is illegal. the supreme court ruling are binding, overruling those lower courts that ruled it was illegal
technically, the supreme court ruling means that the US officially is a country that legalises gay marriage, as opposed to the previous one where only certain states legalised it and some states barred it