You could do this to add labelling
=ArrayFormula(query({hlookup(weekday(A:A),{1,2,3,4,5,6,7;"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"},2,false),B:B},"select Col1,avg(Col2) group by Col1 label Col1 'Day'"))
The day numbers in column C are just for checking.
If any of the dates are missing, you need to ignore them otherwise they will all be treated as Saturdays...
=ArrayFormula(query({A:A,hlookup(weekday(A:A),{1,2,3,4,5,6,7;"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"},2,false),B:B},"select Col2,avg(Col3) where Col1 is not null group by Col2 label Col2 'Day'"))
EDIT
OK this is an answer for the actual requirement which is for sum of time durations for each weekday but divided by number of unique dates which fall on that weekday.
=ArrayFormula(query({query({C2:C,weekday(C2:C),choose(weekday(C2:C),"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"),E2:E},"select Col3,sum(Col4) where Col1 is not null group by Col2,Col3"),
query({unique(C2:C),weekday(unique(C2:C))},"select count(Col2) where Col1 is not null group by Col2")},"Select Col1,Col2/Col3 label Col1 'Day',Col2/Col3 'Average'"))
Notes
(1) The number of groups based on unique dates is exactly the same as the number of groups based on dates with duplicates.
(2) To get the day names in the correct order (Sunday, Monday, Tuesday...) I grouped on weekday number (1-7) then weekday name (Col2,Col3 in the first inner query). This doesn't create any more groups than just using Col3, but has the effect of putting the days in weekday number order instead of weekday name (alphabetical) order while still allowing you to put Col3 (weekday name) in the select list.
(3) Have included @ttarchala's recommendation of using Choose rather than Hlookup.