Ujigami shrine and Uji shrine are related each other and the resided god here is called 菟道稚郎子命（うじのわきいらつこのみこと） / Ujino waki irastu kono mikoto.
He was the second prince. His eldest brother succussed the position of the ruler but some staff around them recommended this second price to become the ruler which he did not want to.
This prince was affected by the political situation and he did not want to be in the position to threat his loving brother and make the country insecure. After three years of turmoil, this second prince decided to kill himself to settle the situation. It is not common as usually there are loads of ugly politicial situations and blood shedding even among family members.
After his death, he was mourned by his brother and the people, and he became god to protect his people and the country.
What can you learn from this?
In the human society, there are many conflicts among family members including brothers and sisters as they compete each other to inherit a house, family fund, assets, fame, attention, love and more. If everyone behaves like this prince knowing his position in the family as the second son, not competing against the eldest son who is supposed to be the inheritor with respect and love, many family conflicts could be settled.
Unfortunately, many people seek for power, money, assets, attention, etc. based on ego, rather than family love and respect. This second prince supported his elder brother and the country by killing himself. There is love and humbleness.
What can you change about you related to your family?