Nagito has never been seen eating or mentioning bagels in canon.
The ship as well as a meme emerged as a result of NicoB's  apparently out-of-nowhere joke, which eventually got promoted into a running gag. Inspired by Aoi Asahina's love for donuts, NicoB decided that bagels will be Nagito's favorite food, which he brought up several times in his gameplays.
According to Nagito in NicoB's series, bagels represent hope. Their opposite are waffles, which represent despair. Nagito's love for bagels is brought up not only in NicoB's gameplays and reaction videos featuring Nagito Komaeda, but also his fanmade series - Council of Voices . For example, in episode 3  Nagito's suggestion for a Bagel theme for the Voicecoming Dance wins and is executed until Monokuma interrupts it with his Despair Blits song (and waffles).
The meme became very popular over the time. In fact, it appears to be the most popular Danganronpa meme. It's sometimes acknowledged and used by the other Danganronpa Let's Players. It was so popular that it was even acknowledged by Nagito's English voice actor, Bryce Papenbrook, and the studio behind Danganronpa games, Spike Chunsoft.