The origin of this festival is considered to be from the Heian era. The death rate for children was high, and children who lived to be 7 years old were called "Children of god" because life was difficult in the world in those days. In hope of health, a celebration is done at 7 years old and 3 years old.
Origin
Ayana