Chrome was started off of WebKit, which also has legacy from many years earlier. Both WebKit and Gecko have code that dates to before the year 2000 in fact.
This is pretty much expected for a huge multimillion line C++ codebases, like all web browsers currently are. All have crufty parts (not sure why GP thinks one browser has nicer code overall? That's not my opinion based on the code I've read.)