Weak attempt at comic relief?
Other than that is seemed pretty pointless except maybe to
point out that Harry is still a mortal. He may have a mantle that numbs him to physical pain, but
he still can get injured. He is a powerful wizard and a star born, but he is still human and not immune to catching the same things that the rest of us are, i.e. allergies, colds, and yeah, childhood diseases. We all know there are vaccines against the likes of measles and mumps now, but some do not get them and if an adult catches one of these diseases it can be lot more serious than in their kids..
My theory is little Maggie had it, we know that she has talent from the short story, but Harry doesn't.
If she had a very mild case, especially since he had never had it before and doesn't know she has
talent yet, he may have thought it was a mere cold and he simply caught it from her. Welcome to the "Parent's Club" Harry, we share a lot with our kids, and they share a lot with us, that includes any contagious diseases that we don't have an immunity to. So I think it was thrown in there simply to underscore that little Maggie has talent, she had the wizard's childhood thing, Harry didn't recognize it, caught it, got sicker because childhood diseases are almost always harder on adults.