Can the Second Law of Thermodynamics explain why ecosystems naturally organize into a complex structure composed of multiple vegetation species and functional groups? Ecosystem structure, which refers to the number and type of plant functional groups, is the result of self-organization, or the spontaneous emergence of order from random fluctuations. By considering ecosystems as open thermodynamic systems, we model and study these fluctuations of throughput signatures on short timescales to determine the drivers and characteristics of ecosystem structure. This diagnostic approach allows us to use fluxes of energy and entropy to calculate an ecosystem's estimated work and understand the thermodynamic behavior of the system. We use a multi-layer canopy-root-soil model to calculate the energy and entropy fluxes of different scenarios for field sites across various climates. At each site, scenarios comprised of native individual plant functional groups and a coexisting multi-group composition scenario including all functional groups observed at the site are compared. Ecosystem-scale calculations demonstrate that entropy fluxes and work efficiency-the work performed for the amount of radiation entering the ecosystem-are greatest in the multi-group scenario when its leaf area is significantly larger than each of its individual functional groups. Thus, we conclude that ecosystems self-organize towards the vegetation structure with the greatest outgoing entropy flux and work efficiency, resulting in the coexistence of multiple functional groups and performing the maximum amount of work within the constraints of locally available energy, water, and nutrients.