This is a tough one. The trick is getting real-time data to matchmaking, and reducing load times.
Here's a rough scenario, as I understand it (I could be wrong):
- Players leave server for whatever reason
- Matchmaking system polls server (pull) or is informed server state (push) ("Hey, we need some players over here!")
- Players join queue looking for game
- Matchmaking chooses players to add to server
- Players join server
So, in this scenario, from the time players leave, to the time players are in game (having chosen class and loadout) can be 2 minutes or longer (depending on client hardware and server poll interval).
Real-time processing is costly in server performance and data transfer, and even if the system is real-time, then there's client times to consider.
To get to the OP's comment, I share your frustration here. There should be some conditions to limit when players are put into a match, basically put: "Is the player actually going to get to participate in this match?"
To my mind these would be:
[COOP] Team is down 0-2 and has captured penultimate objective
[PVP] <2 waves remaining on either team and there are no rounds remaining