TL;DR - she was mistreated by every man in her life, including those on the show, and comes by her closed-off nature and wariness of emotional connection or being "tied down" honestly.
The more times I re-watch How I Met Your Mother, the worse opinions I have of everyone on the show except for Robin.
Ted is determined to find his Manic Pixie Dreamgirl, and will shoehorn any woman unfortunate enough to date him into that role, whether it fits her or not. Every serious relationship we see of his except for Tracey starts with a "No." Robin. Victoria. Robin again. Stella. Natalie. Rachel Bilson's character whose name escapes me. Victoria again. He's basically JD with less homophobia and transphobia.
Barney... well. Go look up Rape By Proxy, and realize that that is what The Playbook is. Yes, he grows. But not until the VERY LAST EPISODE and even then, we don't know if that sticks.
Marshall holds everyone, himself included, to impossibly high standards for ethics and morality, and leaves absolutely no space for nuance or ethical ambiguity. He's unhappy when he's making lots of money because he thinks his employers are unethical. He's unhappy when he's working for the NRDC because he doesn't think the man he's idolized his entire career is doing enough. He's unhappy that his wife and his mother don't get along, when his mother is TRULY AWFUL to Lily.
Lily is irretrievably self-involved. I can't marry Marshall, I have to be an artist. I have an amazing husband and we live a comfortable life, but I want to be an artist. Let me put myself into tens of thousands of dollars of credit card debt so I can wear designer clothing on a Preschool Teacher's salary. Let's uproot my entire family, give up the life and friendships I've created, and deny my husband his dream job so I can be an artist.
And then there's Robin. Struggling newscaster who just wants to do something important with her life. Willing to uproot herself multiple times in pursuit of her dreams. Of course she doesn't want to be tied down, she's not selfish enough to want to force someone to move around the world with her. Ted lies to her to get her to come to a party, tells her he's in love with her on the first date, then basically wears her down until she agrees to date him, only to find out he hadn't actually broken up with his girlfriend first.
First time around, Barney lacks anything resembling the kind of emotional maturity to be in a relationship. To be fair, so does she. But when they break up, Barney is incredibly insensitive, and the gang follows suit. And when they finally do end up together, because they boomerang even more than she and Ted do, despite being so confident he just wants her, he can't stand not being the one in the relationship with all the power.
Don. Starts off by being incredibly disrespectful. Continues to do so by inviting her to a "Party" and trying to pull of The Naked Man, and then criticizes any woman who would fall for it (and yet he wanted her to fall for it?). Isolates her from her friends because he can't deal with the fact that (spoiler alert) SOME PEOPLE CAN ACTUALLY REMAIN FRIENDS WITH THEIR EXES (hi, Claire, nice to meet you), and then takes the job that SHE TURNED DOWN because she wanted to be around him, breaking up with her and moving out of the city. Man I hate that guy.
And we're not even going to start on Robin's dad. You can't be abusive and detached for your kid's entire life and then decide once they're 30 that they're you're drinking buddy. Okay, I guess we did start.
Anyway. I can tell that the writers want to paint Robin as this closed-off career-focus woman who just needs to let herself be vulnerable, but every time she does, she gets totally screwed over.
So yeah, I can see that they were always angling toward Robin and Ted getting together at the end of the show. But for her sake, I kind of wish they didn't.