The carp flag, in Japan, is to celebrate the boys' day on May 5, which is called "Sacrifice Day" in Japanese). If there are boys at home, every family hangs a carp flag. This custom began in the Edo period and was originally the custom of the Dragon Boat Festival in the lunar calendar.
In order to pray that the boys at home will become useful as soon as possible. It is related to the story of yue longmen, a carp in Longmen, China. It is now changed to May 5th of the Gregorian calendar.