Generally speaking, snacks like Doritos or muffins are okay in moderation; we’ve all heard that before. But it is true. And kids also deserve treats/rewards to help build good work habits (Hell, so do adults).
Giving kids unfettered access to junk food AND adults not stopping them (be it parents or teachers alike) is the real problem here. Kids need to be taught right from wrong, especially when it comes to making healthy decisions (especially with food).
Do they need Doritos? No. Should they occasionally have them? Sure, why not? They’re kids.