Ideally Rachel Dawes shouldn't have even existed. It should've been Harvey Dent in her place.

Arguable. However I think she worked as a love interest for Bruce, but more than that a (hollow) chance at a normal life for him, fulfilling a sort of Andrea Beaumont role. And her significance was raised much further in TDK with her relationship with Harvey, not to mention she's the only good guy in the film not to compromise.