If people want to protest (peacefully) then I think they have to do it and should be allowed to do it no matter what they are protesting about.
In the case of people protesting against the outcome of democratic elections (or referendums..) then hopefully at least they can let off steam and gain something positive from their camaraderie with fellow protesters.
And they can eventually go home with the satisfaction of thinking that possibly their protest will make others sympathetic to their cause and alter the way some votes are cast in any future elections / referendums.