It's not that Firefox is actually using that much memory. It's not even that it has a memory leak in the usual sense of a broken garbage collector or something. It all down to memory fragmentation. You can see illustrations of browser memory fragmentation here: http://blog.pavlov.net/2007/11/10/memory-fragmentation/ Firefox switched to jemalloc in 2008, which cut memory usage to less than half. http://blog.pavlov.net/2008/03/11/firefox-3-memory-usage/
Many of the Firefox 7 fixes that reduced memory usage did not have to do with fragmentation; there were a number of true memory leaks fixed, and other bugs where code was allocating more memory than it ever could need.
(For example, I think there was a bug where the find-as-you-type bar could keep the page in memory forever if it wasn't dismissed.)