From 7th Circuit Court of Appeals:
…the majority found that “[i]f a ban on semiâ€automatic guns and largeâ€capacity magazines reduces the perceived risk from a mass shooting, and makes the public feel safer as a result, that’s a substantial benefit.â€
The judges didn’t judge the case from a legal perspective but from how the public feels about it. They are no longer judges if they simply bow to the whim of the public.