The story
A common experience of tenement living in apartment-style housing in New York City and other large cities during the manufacturing boom of the late 19th and early 20th centuries. Apartments were built with very similar designs, with the bedrooms located directly above and underneath one another. Thus, it was normal to hear a neighbor removing their shoes in the apartment above. As one shoe made a sound hitting the floor, the expectation for the other shoe to make a similar disturbance was created.
Etymology from Wiktionary, CC BY-SA 4.0.