The constitution says that people have free speech. The court can not go against the constitution. The judge himself said that what these people were doing was horrible, but that this just isn't something the court can stop. They have to uphold the law.
The law is the same for everyone. Whether they are being hateful and obnoxious or not, their actions are not actionable.
The court can't always do 'the best thing'. They have to enforce the laws of the land.
There have been an awful lot of cases like this in the law, for many years. For example, the wife beater, crook, general all around bad person uneducated hood, who gets accused of murder. He gets the same treatment under the law as the church going business leader of the town. Just as careful and detailed a trial, and all the same due process.
Our country is a country of laws. All people are the same under the law. This is what makes our country great.
Ironically if the bereaved family's loved one actually was gay, given the way the law is written, the court probably could have put the whole bunch of morons in jail for a long time.
I am sure every judge in the land is going to give a hearty cheer when this group trips up. They have to do their job according to the laws of the land, but they are human and have personal feelings too.
Too, ultimately, we have to remember that we have the laws we want. People are tried by juries of their peers. If the laws are inadequate or poorly written so that they can't be used as they should be, it is our legal system, we have the power to change it.