Understanding the evolution of the Sun's open magnetic flux