It does a lot more good for her career prospects than doing the bare minimum and relegating her scope to code monkey.
That's a vague promise here of better career prospects, but this company isn't really rewarding the difference (or telling us) in talent when she's already working for them.
It's hard to argue a person with technical competence and good interpersonal skills isn't going to be in higher demand than a person with the same level of technical competence and mediocre to poor interpersonal skills.
I tend to have no problem saying no to things that I think are bullshit, I have no problem skipping out on extra "team building" efforts or declining to attend the happy hour. I let my work speak for itself and I figure companies keep me around for that, and coworkers know they can come to me with any issues they might be having.
But I have never purposefully taken a coworker out to lunch or asked about their life outside of work (except for when we're on a call before anyone else and they start the conversation), and yet I've had just as much success as people who I've watched do that.
That's not to say that I don't get to know my coworkers I just let it happen organically as we're building things and solving problems together rather than going out of my way to make it happen.
I take the sycophant model of being easy to work with, but I also make sure I don't learn anything outside my silo so that I don't get a lot of work and can interview prep.
Yeah, so in the example, what does that engineer get for going above-and-beyond and being more effective than most of your team? Because I see that she's doing a lot of critical work, but not a lot about what she gets for putting in that effort. That doesn't feel very motivating.