Aye. Maybe a dog can even get used to eating chocolate...?
If you kept your dogs on dog-food only and they got into something like onions their bodies may have been entirely unprepared. This is similar to people who don't feed their dogs scraps -- those dogs usually get sick if they get into the trash or if they're fed something they usually don't get.
Wish you and your dogs the best.