As my perspective When table having lacs of records at that time the AVG() calculation will be done on database side only and if you fetch those data into PHP and calculate then it will take too much process.And it makes performance down. So its good to calculate average inside database only.
And one more thing you told that Utilizing the strength of database when analyzing data, it perfectly true. Otherwise what is the use of database functions and all.