Horses may be damp with sweat if the temperature suddenly soars up, and your horse will be sweating beneath its warm coat. So rolling helps to relieve the itchy sweaty feeling while removing some of that excess hair. Rolling may also help dry the horse's skin, which is why it will do it after a rain or bath.
I guess horses can't shake like dogs, so this is the next best thing.