I did mine on a mill. I suppose you could do it on a drill press with a center cutting end mill. And yes, it's to give the nut a flat to tighten against.
It may be ugly, but it sure is slow.
Girls comb their hair in rear view mirrors and the boys try to look so hard....