You might think that water is an obstacle to be eliminated. It’s true that moisture is the enemy of browning, but the first part of the onion-cooking process is about softening, not browning. Surrounding the onions with steam at the outset heats them more quickly than the cooking surface of the skillet alone would.
So adding water and covering the skillet causes the raw onions to wilt faster and more evenly as the water turns to steam. Then, uncover the skillet and begin a process of pressing the softened onions into the bottom and sides of the skillet for maximum contact—and maximum browning.
Press, let them sit for about 30 seconds, and stir, and then repeat this process for 15 to 20 minutes.
As the softened onions caramelize, they release water, sugars, and proteins. The water evaporates, concentrating flavor. Some of the sugars undergo caramelization, in which their molecules recombine into hundreds of new flavor, color, and aroma compounds, and the amino acids in the proteins react with some of the sugars to undergo Maillard browning, producing an equally diverse array of flavors and aromas.