When you install a new program update, there is a point where avast has to change the low level drivers, it can't do that with avast running.
I think that during this period windows detects avast (or your AV) isn't up and maw switch on defender. When avast is installed, windows should automatically detect that and disable defender.