They collected the fat from pigs because that was one of the few sources they had.
Protein is not hard to find in the wild, carbs a bit harder but fat is the real prize especially in winter.
Boiled in cauldrons and lifted to ramparts it was also the medieval equivalent (when dumped on attackers and set alight with fire arrows) of napalm.
"I love the smell of pig fat in the morning. Smells like ... Breakfast!"