Those tests are not absolute tests.
The results depends on the settings, the version of the av, the database with malware that is used, the OS etc. etc.
I have noticed that avast since version 2014 detects a lot more than it did before.
It also happens more and more that avast is detecting threads before other av's do.
Next time read the test results please:
Protection against 0-day malware attacks, inclusive of web and e-mail threats (Real-World Testing)
avast 90, avg 96
Detection of widespread and prevalent malware discovered in the last 4 weeks (the AV-TEST reference set)
avast 98, avg 97
Use cases: visiting websites, downloading software, installing and running programs and copying data
avast 3s, avg 4s
As Meatloaf already sang(?), two out of three ain't bad.
And avast scores higher in 2 out of the 3 tests than avg.