If there were a way to efficiently manage 2.5 million staff in a single department, then we'd likely do that, but it's more efficient to specialise, so we do that instead.
Firewalling data between departments is rarely a design consideration, except in obvious cases (military), and it hardly matters in this scenario anyway, because it's not like Musk is walking into all 400 agencies with a laptop. DOGE is hiring an army of advisors and dividing them up between agencies.