Don't forget that under Scottish law he will be out of prison on licence in 4 months if he behaves. No doubt his previous convictions were also taken into account.
There is a need to let people know the courts are serious about punishing bigotry, that way the otherwise good citizen dad won't find himslef locked up for a stupid moment on a Saturday afternoon.