Sure, don’t give dogs twinkies, but for that matter, don’t give humans twinkies either. The idea makes it seem like dogs are aliens or something. Dog food ingredients are usually meat, grain and veggies, just like our meals. Food that is healthy for you is healthy for your dog, and vice versa.
I think this advice is so you don’t feed your dog then also feed them from the table, because then they get fat and learn bad habits.
But if you want to make your dog meals made of food, of course it’s possible. My lunatic ex used to feed our dog only frozen meat, frozen not thawed and the dog was healthy.
Also had a cat who loved to share food, he liked cooked greens, seaweed, beans - not just things you think a cat would like. He lived to 22, six years longer than his less adventurous sister.
I love dogs. Some human food is fine for them. Other human food can kill them. It’s your responsibility to educate yourself as to which ones are which.
Saying “food that is healthy for you is healthy for your dog” is absolutely not true, there are plenty of fruits & vegetables that are great for people, but terrible for dogs. For example, this article lists 19 fruits & veggies that are harmful for dogs - https://iheartdogs.com/10-veggies-fruits-that-are-harmful-to-dogs/