Why does the author compare her sister's red dancing shoes to red carp in this poem?

Because the author regards the glass window as a fish tank.

My sister's red dancing shoes are raining outside.

The author regards the glass window as a fish tank, rain is the water in the fish tank, and my sister's red rain boots are goldfish. In other words, my sister's shoes are raining outside and floating in the water as a metaphor.