The vedic scriptures also give detailed advice on how and when you should marry and have a martial life living and so on.
It is said, that someone who has no mother at home or does not get along well with his wife, he should leave his home immediately and go to the forest and dedicated his life to become spiritual.
The explanation for staying at home when the mother is also at home is, because according to vedic principles women should always be protected, that is why a man cannot leave his home when his mother is still there and is not protected by her male children for example.
The explanation for that one should leave his home ( and wife ) immediately, if they do not get along well, is because the human life is destined for making spiritual progress and the wife has to support her husband with this, if she does not do that, there is no need for having a marital life and one should leave immediately, since spiritual progress is the most important goal in life.
It is common in the current age, that almost no man follows the vedic system and leaves their home for making spiritual progress since they are too attached to material things like having a sex life and being attached to their children, even if they do not get along well with each other. Ideally the wife follows and supports her husband in making spiritual progress, but this is probably very very rare, especially in the current kali yuga age also ideally both the wife and the husband should leave the home and go into the forest to make spiritual progress. However one should not misunderstand the term going into the forest, this has to be understood more metaphorically, since going the spiritual path is no longer possible like it was in the old days where it was common that someone could just leave his material life and life somewhere in the wilderness. It is also not recommended to do so in the current kali yuga age and really leave the home and literally live in the forest, since the living conditions have become so bad. However this is no contradiction, since leaving your home means leaving the marital life which is the core of the materialistic life and going to the forest or sometimes also mountains is synonymous with living the spiritual life far away from the material life.
PS: If someone thinks he is really hardcore spiritual, he can also try to go to the forest literally and make spiritual progress. (with wife or without, if she does not support the husband on his spiritual path)