It does not directly say why Walter Cunningham covered his food in maple syrup, but we can make an educated dress. Before we proceed, there is an important quote that gives us clues.
To Kill A Mockingbird
Walter Cunningham’s face told everybody in the first grade he had hookworms. His absence of shoes told us how he got them. People caught hookworms going barefooted in barnyards and hog wallows. If Walter had owned any shoes he would have worn them the first day of school and then discarded them until mid- winter. He did have on a clean shirt and neatly mended overalls.
“Did you forget your lunch this morning?” asked Miss Caroline. Walter looked straight ahead. I saw a muscle jump in his skinny jaw.
“Did you forget it this morning?” asked Miss Caroline. Walter’s jaw twitched again.
“Yeb’m,” he finally mumbled.
Based on Scout's description of the first day of school, we can say a few things. First, Walter Cunningham comes from a poor family. This is why he did not have shoes or lunch. Moreover, he was emaciated and had hook worms. Poverty defined him.
Second, Walter was hungry. So, when Jem invited Walter to come over to dinner, he was very hungry. As for maple syrup, we can say that, as a boy, Walter really liked molasses, and his family did not have enough money to have it. When Miss Caroline asked the children to take our their lunches, Scout says that all the kids brought out their molasses buckets. The only boy that did not have this was Walter. So, when the the Finch family had molasses he doused his food.