Recreational or emotional eating are commonly cited explanations for obesity. The belief is that people eat to relieve boredom or to fill some emotional void in life, implying that one ought to replace food with some other activity to bring gratification. The concept is somewhat vague, but Mayo CLinic defines emotional eating as:
Emotional eating is eating as a way to suppress or soothe negative emotions, such as stress, anger, fear, boredom, sadness and loneliness. Major life events or, more commonly, the hassles of daily life can trigger negative emotions that lead to emotional eating and disrupt your weight-loss efforts.
Same for coverage by the media:

For recreational eating to be ‘a thing,’ people would have to eat as the sole form of activity, like eating while staring at a blank wall or daydreaming. I am sure some people do this, but I hardly recall ever eating for the sake of eating. Instead, at least as I have observed, eating complements other activities, such as watching TV or videos on YouTube, or reading a book.
Hence, the claim that people eat out of boredom and should focus on non-eating activities to distract from food, presupposes that these are separable or discrete activities, but eating makes everything else more enjoyable. Why do social events have food? Or food at movie theaters or stadiums? This ‘commonsense’ advice predictably fails because food and socialization are linked.
The act of ‘getting out and doing stuff’ is a process that is also mediated by food. For example, the best way to get people to join any event, meeting, or seminar is the promise of free food. It’s little surprise the largest and most successful of tech companies are famous for generous spreads of cafeteria food and other snacks to boost worker productivity. Otherwise, employees would be staring at their screens unable to focus on anything, or on their phones just idling.
A lot of activities have ‘boring parts’. Food makes this more tolerable. For spectator sports, the boring parts are everything that goes on in-between actual play, like timeouts or breaks. It’s not unusual for a 2–3 hour game to contain only 18–20 minutes of actual “play time”. If fans were expected to sit through all of that without food or other distractions, they’d become fidgety very quickly. Or when going to the movies, the boring parts may be the previews or slow pacing of the dialogue–hence snacks. If people had to ‘raw dog‘ going to the movies–no food–attendance would plunge.
I can relate. For example, one of the boring parts of writing math papers is transcribing handwritten notes to LaTeX, a tedious process prone to errors. Eating a nice snack makes the process at least more enjoyable and breaks through the inertia of getting started, compared to just staring at a blank document as nothing gets done. Somehow society places high expectations on people to perform, yet we’re supposed to maintain a monk-like discipline of diet in doing so. I don’t think this is fair: I cannot prioritize both meeting unreasonably high demands on body image and productivity.
Interestingly, although digesting food takes blood away from the brain, the process of eating has stimulative effects like dopamine. This produces a ‘locked in’ effect, followed by the characteristic pleasant sleepy feeling hours after eating as the food digests, which is nice when your work is done and you no longer need to concentrate. So you can wind down without the jitters of stimulants, with the food having served its purpose. It works perfectly.
In summary, it’s not so much as if people eat out of boredom, but rather to make everything else in life less boring. However, as GLP-1 drugs become more popular, less eating may mean less socializing. Taking away food may mean removing one of the sources of joy or richness of life, and this is something I don’t think ‘we’ as a society are entirely prepared for.