Confused and worried

Hi I have just came back from  my gp from having discharge from.my right breast she said she can't feel any lumps but wants me to go for mammogram but not got mo lumps or anything else but just wondering if anybody knows why or is it just a precaution I have no other symptoms but breast is very sore and tender