The function of the electron transport chain is to produce a transmembrane proton electrochemical gradient as a result of the redox reactions. If protons flow back through the membrane, they enable mechanical work, such as rotating bacterial flagella.