There is a variety of things it could be. For instance, Maggie could have seasonal allergies or maybe irritation from being outdoors. She could also have some sort of ear infection such as a yeast or staph infection that is aggravating her. Floppy-eared dogs and dogs that are avid swimmers tend to be the most prone to ear infections. I would consider consulting your vet if it persists.

What food is she on? What formula? Some dogs can be sensitive to ingredients like beef that may cause chronic ear problems.