It means, "... it all goes in" in this case, the food all goes into the garbage, and it's good grammar.
It's a narrative style that adds some dramatic feeling to statements.
"We lit the fuse on the rocket, and up it shot!"
"Onwards they strode, though the snow was deep."
"Into the monster's eyes she did not dare look."
In this structure, an adverbial of direction shifts to the front of the clause.
While any kind of dramatic storytelling can include this structure, it's a hallmark of songs, stories and rhymes for children.
It cannot be applied to all adverbials of direction though. As I mentioned above, it only works with statements, that's to say, sentences that describe something, rather than perform some other function. So, while this is correct:
"Upstairs he whisked her bags." (statement)
The following sentences are incorrect because they are not statements:
*"Upstairs let me take your bags." (offer)
*"Upstairs will you take my bags?" (question)
*"Upstairs take her bags." (command)
To better understand the "dramatic" meaning in this particular sentence, read Owen Reynolds's excellent answer on this page.