Not all halflings, of course. Some of them cremate their dead. And their have been rare instances of halfling burial, generally under unusual supernatural circumstances. But most halflings, in most cases, eat their dead.
They're a nomadic people, and thus they feel that it's better to carry their lost loved ones with them then to stick them in the ground in a place to which they may never return. They also believe that, by eating a person, they can absorb that person's strength and wisdom, and carry on their works. There are also some practical considerations; though not all halflings inhabit swamps and waterways, many do, and it's difficult to properly bury someone in that sort of terrain.
It's very unusual for halflings to eat non-halflings, or even members of their race that they don't have a strong personal connection to. It does happen occasionally, most often when the odd, marginalized sect comes up with the idea of eating their enemies. It's even more unusual for a non-halfling to partake of a halfling funeral ritual, but that, too, is not completely unknown.
Halflings don't usually bring it up when they live around other races. They think everyone else's practices are a little unnatural, but they're aware that a lot of other people find theirs downright repulsive, so they don't push the issue. A halfling adventurer might ask it of their comrades, in the event of their permanent death, but only with people they'd known deeply for years.
(Yes, I sort of stole this from Dark Sun. Dark Sun is cool.)