Buttonhole

This is a row of perpendicular hand or machine stitching to reinforce the raw edges of the fabric, and to prevent it from fraying.

So as not to confuse the poor chamber maids, the wealthy began having women's garments made with the buttons and holes 'switched'; the birth of the modern ladies' blouse.

The chamber maids themselves, as did most all the common class, both male and female, actually wore 'shirts' with buttons and holes placed as on men's clothing.

There appears to be no concrete reference to prove or disprove this story, but its plausibility bears noting.

[6][7] Sewing machines offer various levels of automation to creating plain buttonholes.

Machine-stitched keyhole buttonhole with bar
A machine-made buttonhole.
A bound buttonhole. The inset fabric panels are called welts .