I’m a heterosexual woman so will position this from my own perspective but it could apply to any relationship.
If you meet a guy who has previously been a useless boyfriend. Perhaps he lied, cheated, was lazy or just didn’t commit. If he meets the love of his life, how likely is he to change and become a good boyfriend?
I think I overlook men’s flaws because I naively or perhaps arrogantly think that they just haven’t had their right / best / forever relationship yet and it will be different with me!
YABU - men don’t change. If he was a crap boyfriend to his ex, he’ll be a crap boyfriend to you too.
YANBU - of course men can change and they frequently do change when they meet the love of their life, even if it took them 40 years to do so!