I have heard that mane pulling can be painful for some horses, but I have not personally worked on a horse for whom it was painful. More often than not if a horse does not like his mane being pulled it is because he does not like the feeling of his neck being yanked to the side, but it doesn't actually hurt or even really do that very much unless you're ripping out a giant chunk every time.
I have had multiple horses who would go into a mini panic if you did any tiny thing that accidentally hurt them who would stand completely relaxed for a pulling job.
It may sound like a brutal process, but it really isn't. Personally, as an animal rights supporter and passionate horse lover, I would never purposely cause my horses undue pain. A well-done pulling job done patiently, pulling the correct amount of strands at one time, does not hurt the average horse.
The purpose of roaching..there are a lot of purposes. For some horses, such as the Norwegian Fjord, it is tradition
It is also often done to get the mane out of the way of the riders hands, equipment, etc., to revive a mane that has been so damaged by other horses, rubbing, etc. that it no longer looks presentable, simply for looks, to keep the mane off of the neck to avoid extra heat, to accent a good neck (cutting it to a certain pattern makes the neck appear much thicker), or any other imaginable reason.