I think she just needed to put "Hung Up" somewhere, and she decided to put it there, since there is no a "disco" section (and it not fit in the 80's first part). The same with several songs, which is why the narrative feels "broken" on several occasions.