My 2 cents: Rachel was a neccessity because there's a big difference between friends and lovers. Being Batman doesn't affect Bruce Wayne's relationship with Alfred, Fox or Gordon because for the first two, both those guys are actually HELPING with Wayne's Batman persona. And Batman's relationship with Gordon (so far) is essentially one of business. Gordon is a cop, Batman fights crime. Same goal, different methods, mutual partnership. Bruce has had zero problems maintaining those relationships while still running around as Batman.
But with Rachel it was different. He couldn't be with her (or any woman long term) while still being Batman because unlike the relationships he has with Alfred, Fox and Gordon, having an intimate relationship requires time and effort.
When's the last time Alfred, Fox or Gordon complained to Bruce Wayne/Batman that he wasn't spending enough "Quality" time with them? Or that they needed to move on because they felt unfulfilled? Never right? But Rachel obviously did because she started knocking boots with One-Face before he became Two-Face.
So IMO those two movies needed that character to show what Bruce was willing to give up in order to continue being Batman. And to me, that's the key: Dude chose his little costume and gadgets over some vajayjay from his childhood sweetheart.
But that's the character. Bruce Wayne is so obsessed with Batman that he's willing to sacrafice everything else in his life for it. Same reason he had no problem rolling around with kids (in comics/cartoons) and putting their lives in danger. He just doesn't give a ____.
When you think about it, dude is selfish and seriously screwed up in the head.
Which is funny because he's like a "good" version of all the villains he faces.