Some types of traps sold for bugs will have pesticides/baits in them that can be highly toxic to animals. Its possible they were poisoned.
If it didn't have anything in it and it was just the trap, I would suspect the wasps were rotted and may have had time to build up a lot of nasty bacteria...