This was one of those facts that I had to delve into more because I thought it was a myth originally. The chef's hat, or toque, usually denoted a chef's experience by how high the hat was. The taller hat meant the most knowledgeable chef. The pleats were also a sign of that knowledge and how cooking an egg, since it was so versatile, showed that chef's skill. Here's one of the best sources about a chef's hat I found. Thanks for the response and happy learning!
https://www.escoffier.edu/blog/culinary-arts/a-history-of-the-chefs-hat/