Even more generally, this applies to commodity markets. Price of potatoes is x EUR/kg, set by supply and demand. If some farmer can produce potatoes for 0.1x EUR/kg, they get to make a good profit.
Now electricity wholesale markets are an artificial construct, but it has been designed to mimic other commodity markets in that the producer on the margin sets the price.
Now electricity wholesale markets are an artificial construct, but it has been designed to mimic other commodity markets in that the producer on the margin sets the price.