Women are tested for HIV/HEP/Syp etc when pregnant (unless you choose not to) The milk banks screen donors AGAIN before they are allowed to donate, then the milk is screened for everything including any bacteria or organisms before it is pasturised and given to the babies. They ask the same questions as they do before you are allowed to donate blood, drug use/other risk factors etc. You are not allowed to donate at all if you fall into any of the 'at risk' catagories, the same as blood donation.
Donors have to be very careful when expressing to make sure that the milk doesn't become contaminated with anything as if it does it will be thrown away by the lab, you have to be alot more careful than you would be if expressing for your own baby only. A donor also has to be a none smoker, if you have alcohol you can't express for 24 hours afterwards, you have to stick to a healthy diet and they also check what medications you are on, only things such as POP etc are ok and still donate.
Mothers milk banks are very very careful, they don't want your baby to contract anything any more than you do, this milk is provided to save lives and the donors are just normal women, women in the 'at risk' catagories can't donate anyway so the donors are no more at risk of contracting HIV as yourself or anyone else you know. This milk is safer than formula, formula isn't sterile 100% of the time and formula doesn't have any of the health benefits which bm does and with preemies formula can actually cause/raise the risk of complications. Accepting donor milk is safer/just as safe as accepting a blood transfusion for your baby, the donor is tested, the milk is tested and the milk is pasturised then tested again, blood doesn't get nearly as much treatment.
Blood donors are screened by questions and the blood is tested once only the donor is never tested prior to donation unless they have needed to be for a different reason, it's not required to be done to donate blood whereas it is a requirement to donate bm. The HIV transmission risk is alot higher with blood products than it is with bm anyway.