Sir Joseph Whitworth is quite the famous name in engineering circles, credited with the development of such things as Whitworth threading (the first standardized thread pattern) and engineer’s blue. When he decided to make a rifle, he decided that he could make flat surfaces more precisely than round ones, and chose to design a rifle with a hexagonal bore and mechanically fitted bullets.
Video: [15:19]
https://youtu.be/Hi-S_horZGk?si=
Ian makes a correction to the original video: [7:18]
https://youtu.be/cUd2RQGfL7E?si=
Button rifling is common, but as I understand it the machines are pretty expensive, so it’s the big players doing that, mostly. There’s still plenty of traditional cut rifling too. IIRC, the cut rifling ends up with a better finish and doesn’t get as much stress imparted to the steel.