Peeps consider many things as treats. Most common is scratch. Mealworms are another. Kitchen scraps also fall in that category.
There are also peeps that get upset and get their undies in a bunch if they don't conform their chickens to a SCIENCE DIET.
I am not in that group

I give treats and such all the time. Have done this for over 20 years. Only keep chickens as pets. All my chickens
live long lives. (unless predator attack) My oldest chicken went to the Rainbow Bridge at 13 years old.
The drawback with giving
too much treats like scratch, is simple. Scratch witch contains corn, and other grains does not contain much protein compared to chicken feed. Chicken feed is 16% protein or more. I use Alflock that is 18%. Scratch is probably at about 9% protein. So giving too much goodies dilutes the total protein intake by the chicken.
That is like giving our children unbalanced menu diet for dinner.
Chickens will be fine, but the egg production will not be optimal.
There are also other valid arguments about giving too many treats to chickens. Those are parallel to humans eating too many treats and being overweight.
Do not consider vegetable treats as something you should avoid. I give my chickens all the veggie scraps from the kitchen all the time. Never had any negative issues.
WISHING YOU BEST,,,,,,,,,,,,,,,,,,,,,,,,,,,, and
