Why do you think it was stupid?? I think it was stupid to give him such an awful death in front of his "people", but killing him had to be done. If Stannis is to lead wildlings into battle he has to be viewed as their leader, if not as their king. Mance was holding all the keys in this regard and wouldn't submit.