Such an large aircraft in the A2A role seems very strange. Perhaps as a missile truck in conjunction with NGAD/F-35? You only need the big bay for that, not secondary smaller bays. In the bombing role you would want to get in and out undetected and shooting your way in and out amoungst enemy aircraft is not the way to do it. Come in above enemy fighters from an unlikely direction is.
Even in the SEAD role it seems far too big and unmanuverable and again, shooting your way into a target hardly seems stealthy.
Either the USAF has gone mad in wanting an A2A role in such a huge aircraft, or we simply have no idea why those bays exist. My money is on the latter.
A smaller bay with a smaller door can have a faster open/launch/close cycle, so less time for the radar to catch you with a large RCS. If that's the case with the doors on the B-21, I'd expect that they're for a couple of ARMs and any decoys or ALEs carried. AAMs are less likely, but possible, especially if Peregrines or CUDAs can intercept incoming AAMs as well as fighters.
There's a bit of a fun argument for a "Megafortress" type mission for the B-21, having one bird in the flight that is dedicated to SEAD/DEAD and loaded with AAMs and ARMs.
There's also the original reasoning for Bomber Defense Missiles as being able to intercept SAMs and AAMs.
.....
Remember that the A-12's design brief had space for 2x AMRAAMs, 2x HARMs, and 2x 2000lb bombs, so there's definitely precedence for stealth attack/bombers having A2A capabilities.