A shipping container holds only so much weight. Each product earns a different value but consumes different weight. Which mix should you load to maximise the value shipped without exceeding capacity? That is the classic 0/1 knapsack problem - solved here to the true optimum.
The knapsack problem picks the most valuable subset that fits a capacity.
Each item has value and weight; optimisation packs the best combination.
Value density (value/weight) is the greedy compass - and exactly where it fails is the lesson.