Umm maybe because Titanic appealed to a wider audience? As in, both teenagers (though probably more so female than male) and adults (young, middle-aged, and elder) alike probably went in masses to watch the movie. On the other hand, The Dark Knight is more geared toward the teenager/young adult/kids crowd (while appealing to females as well even though the genre is more for males).
And even if The Dark Knight managed $600.8 million domestically, Titanic actually brought in more people because of price inflation throughout the years. Actually, I believe more people bought tickets for Star Wars back then even though TDK has surpassed the movie on the charts. :look: