The problem with testing is that a negative test today does not prevent you from catching the virus tomorrow. All you have to do is be in contact with someone who has it.
So you can't just test. You also need to avoid contact with other people, unless they have also tested negative. The White House clearly was not doing that. Even if they had, the tests are not totally reliable.
Given the number of people who come and go from the White House on a regular basis, it's kind of a surprise they didn't have an outbreak earlier than they did.
They also haven’t been following basic safety protocols. Further, we learnt when Trump had COVID that they were actually not even testing Trump on a regular basis. That’s probably also true of other members of the administration.