In old days, sons of SAMURAI who was not the eldest son were often left with temples.
This is because they were afraid of a feud about a succession to a house.
Therefore many SAMURAI left their boys with temples except the oldest son and fixed him for their inheritor.
On the other hand, they used their daughters in a political marriage.
They made their daughters married other SAMURAI or nobles for defending their territory or getting bigger power.
Sons of SAMURAI who left in temples could come back to SAMURAI only when the eldest son died or was considered don't deserve to be a successor by vassals.