It appears the stories in the question are not from the Pali suttas but are later commentary stories and Mahayana ideas probably created to salvage Gotama's misogynist reputation.
It appears Yasodharā is not mentioned in the Pali suttas, apart from supposedly as Bhaddakaccānā in AN 1.245. The Pali suttas appear silent on Yasodharā and only refer to Gotama's parents when Gotama left home.
So, at a later time, while still young, a black-haired young man endowed with the blessings of youth in the first stage of life — and
while my parents, unwilling, were crying with tears streaming down
their faces — I shaved off my hair & beard, put on the ochre robe and
went forth from the home life into homelessness.
MN 26
The Pali suttas do not report the traditional fables or children's stories about Gotama seeing a sick, old & dead man and secretly leaving home. Instead, the Pali suttas report Gotama unhappy with worldly life in his palaces and having an existential crisis (refer to Sukhamala Sutta).
Since Gotama left home after his son was born, it appears possible he made a deal with his father to bear an heir to the throne. In other words, his wife was probably unimportant, apart from her role of child bearing (breeding) for the family lineage.
Since Gotama was married for 13 years but childless, based on the above suttas mentioned, it appears obvious Gotama had little or no interest in sex. Obviously his family (clan), wife, child and royal status were a burden for him. This is probably why the Buddha taught in MN 26:
Monks, there are these two searches: ignoble search & noble search. And what is ignoble search? There is the case where a person, being
subject himself to birth, seeks [happiness in] what is likewise
subject to birth. Being subject himself to aging... illness...
death... sorrow... defilement, he seeks [happiness in] what is
likewise subject to illness... death... sorrow... defilement.
And what may be said to be subject to birth? Spouses & children are subject to birth. Men & women slaves... goats & sheep... fowl &
pigs... elephants, cattle, horses, & mares... gold & silver are
subject to birth. Subject to birth are these acquisitions, and one who
is tied to them, infatuated with them, who has totally fallen for
them, being subject to birth, seeks what is likewise subject to
birth.
And what may be said to be subject to aging... illness... death... sorrow... defilement? Spouses & children... men & women slaves...
goats & sheep... fowl & pigs... elephants, cattle, horses, & mares...
gold & silver are subject to aging... illness... death...
sorrow... defilement. Subject to aging... illness... death...
sorrow... defilement are these acquisitions, and one who is tied to
them, infatuated with them, who has totally fallen for them, being
subject to birth, seeks what is likewise subject to aging...
illness... death... sorrow... defilement. This is ignoble search.
In conclusion, Gautama Buddha's wife Yesodhara was probably highly instrumental in Him becoming a Buddha because she showed Gautama she was incapable of bringing Gautama any real happiness but would only bring burdens & misery.