It's not just the average where MM is concerned. He had an incredible SR as well and was great vs all comers. Highest average of 23 or so vs any team. And highest average in any country of 24 (discounting 3 tests in NZ). As great as McGrath was, he just doesn't match that level of absolute consistency. There was a time MM played like 7 tests series in a row taking 20 wkts + now that's telling considering his competition for wickets and the plethora of draws from that era. I'm curious about this flatter era thing, because McGrath debuted in the early 90s. Therefore his stats up until the "flat era" should be much better. They aren't. They are in the same ballpark of his contemporaries: Ambrose, Donald etc. Just that they all retired while McGrath carried on. Had they not my educated guess is they would be done just as well as Mcgrath ala the 90s.
McGrath debuted in 1993 but didn't hit his straps until 1995.
He actually averaged more in the 90s than in the 00s. In an era of flat tracks and more 50+ average batsmen than at any other time in history, McGrath averaged 20.53. That's simply absurd. The only bowler to do better in the era was Walsh, who retired in 2001.
McGrath took wickets at a lower average than Murali in the 2000s, and he did it mostly on Australian roads. His closest contemporaries (fast bowlers who played 30+ tests in the era) were Dale Steyn and Shaun Pollock, both who are ATG bowlers and both who averaged 15% more than McGrath in the era, and both of who were based in South Africa (which is generally easier for the quicks).
Only 23 bowlers who took 50+ wickets averaged under 30 in the 2000s. McGrath averaged 20.5. It's simply insane.
McGrath's slowish start to test cricket (not really coming good until 1995) artificially inflates his 1990s statistics (and indeed his overall career record). Without those two years on his record, McGrath's overall average drops to 20.87. That's crazy good for a 12 year period.
Of course, Marshall's record looks even better than that, though only for 11 years of his career (his first two years his record isn't great, but it's only over 3 tests so it doesn't skew the stats as much as McGrath's first two years).
Taking McGrath's 12 year peak average of 20.87 and Marshall's 11 year peak average of 20.4 there is very little to split the two. McGrath's economy was fractionally better and Marshall's strike rate was fractionally better. McGrath took more wickets but played more tests. Marshall took more large hauls and took fractionally more (0.1) wickets per match, while McGrath dismissed a much higher proportion of top order (1-3) batsmen.
There is very little to separate these two greats when you look at their respective peaks (if 12 years of a 14 year career can be said to be a "peak").