What are those little studs on jeans actually for? There is a purpose! They are a type of garment trim.
What is trim, actually? Fabric trimmings such as lace, braid, cord, piping, metal hardware, and fringe are most frequently used to literally “trim” a garment by attaching them along the edge of the sleeves, hem, collar, or bodice, etc. Trimmings in this category can be made from natural fibers such as cotton, linen, silk, wool, rayon, or raffia, as well as from polyester, nylon, and other manufactured fibers, and are not considered part of the main fabrics included in the body of the garment. In addition to fabric trims you may often find hardware trims in garments, such as rivets, grommets, button shanks, zippers, or snaps. Many emerging designers will under-cost hardware trim and mis-estimate lead times, getting wrapped up instead in the leadtimes and approvals of their main fabrics. However! It is absolutely imperative that your trim sourcing does not get neglected, as it will require the same process of costing and leadtimes! Trim hardware, in particular, can often price out more expensive than anticipated due the nature of the materials and finishing involved in making tiny functioning metal objects (just take a look at any well-manufactured bag and notice how heavily it relies on smoothly functioning clasps, buckles, and zippers).
As can be expected, the history of some of the first garments to incorporate trim hardware can be traced back to jeans, though original Levi’s did not contain rivets. A tailor by the name of Jacob Davis invented riveted pants at the request of a miner who complained that his regular pants were not rugged enough to hold his mining tools. Davis subsequently granted Strauss the use of his rivet idea, which was patented on May 20, 1873. Few other changes were made over the next century. Zippers replaced button flies in 1920 (although later button flies had a resurgence of popularity) and in 1937 the rivets on the back pockets were moved inside in response to complaints from school boards that the jeans students wore were damaging chairs, and from cowboys that their jeans were damaging their saddles! In the 1960s, they were removed entirely from the back pockets and replaced with bar tacks, which performed the same function of keeping the pockets securely in place without the drawback of small metal rivets scratching inanimate objects.