Many birds peck or attack thier reflection because it stimulates their territorial invasion response. Birds that flock are unlikely to do this as they do not have individual territories.
For the above answer, I have presumed that it was the glass the birds were pecking. Fresh putty can also be attractive to some birds because of the linseed oil it contains.