Nature can be full of drama.
It might seem like the fly was incidental, but it isn't. Small black flies of the family Milichiidae are known to steal food from predatory insects and spiders. It is a behavior known as kleptoparasitism.
Being a freeloader that steals food from a predatory insect seems like it might be a dangerous lifestyle, but the mantis seems occupied with the wasp and is not reacting to the fly.
Have you ever spotted a freeloader fly?