The role of reversibility in quantum thermodynamics and the foundations of quantum theory