You are right that it can be bad and you are right that it can be good.
There is a difference between table scraps and healthy people food. A lot of foods are not okay. There are many human foods that are just fine for dogs (after all, what do they put in dog food? Generally a very disgusting version of what we eat... Some just gives snacks and some actually give all human food. Hopefully those that do that are following a complete and balanced recipe from a nutritionist. It is important to be extremely careful though. One bite of something on the "no" list and cause some very serious issues.