As I posted in answer to this exact same question over on the Steam forums...
All ships in the ED universe are equipped with a Tiolce Waste2Paste unit. This miniature marvel of chemical engineering recycles all ship-generated biowaste with a near-99.5% efficiency, meaning that a ship in space can become effectively a fully contained, closed ecosystem.
(If you don't believe me, go to the Tiolce system, and check out the description for the Rare Good found there.)
Most in-bubble travel occurs over such brief periods that the Waste2Paste unit is not needed or used, with shipments of regular food ordered in for pilots, crew and passengers and the waste tanks emptied as part of the service whenever you dock (all that "biowaste being generated by every single space station in the game has to come from somewhere). But for explorers out in the Black for weeks or months, or for military units on long deployments of patrolling or blockade duty, these Units are essential.
Yes, you do need to have a certain fortitude to continually eat your own waste, no matter how much your autochef's food cartridges pretty it up to look like hotdogs and burgers. And explorers no doubt have a stash of "real food" to eat on special occasions, to keep themselves sane (and to balance out that 0.5% of waste that cannot be recovered).