For public office I’m not entirely sure there should be an exception. I’m not sure why there is, other than people might say it’s unfair to women who are the most likely to have had a name change and it’s an extra burden than most men won’t need to do.
If a man changed his name for marriage I would like to be aware before voting as well.